Commit 2a3f10f9 authored by Laurent Claustre's avatar Laurent Claustre

Merge branch '2-python-3-syntax-errors' into 'master'

Resolve "Python 3 syntax errors"

Closes #2

See merge request !20
parents d1d6b431 10fefa69
Pipeline #5308 passed with stages
in 1 minute and 33 seconds
......@@ -2487,8 +2487,8 @@ def declare_camera_n_commun_to_tango_world(util) :
specificClass,specificDevice = func()
util.add_TgClass(specificClass,specificDevice,specificDevice.__name__)
if warningFlag and verboseLevel < 4:
print ("For more pulgins dependency information start server with -v4")
print ("For more plugins dependency information start server with -v4")
def export_default_plugins() :
#Post processing tango export
util = PyTango.Util.instance()
......
......@@ -254,10 +254,10 @@ def main():
U.server_init()
U.server_run()
except PyTango.DevFailed,e:
print '-------> Received a DevFailed exception:',e
except Exception,e:
print '-------> An unforeseen exception occured....',e
except PyTango.DevFailed(e):
print('-------> Received a DevFailed exception:',e)
except Exception(e):
print('-------> An unforeseen exception occured....',e)
if __name__ == '__main__':
main()
......@@ -412,7 +412,7 @@ class LimaTacoCCDs(PyTango.Device_4Impl, object):
if release:
release()
if da_len != frame_size:
raise Core.Exception ( ('Client expects %d bytes, frame has %d' %
raise Core.Exception( ('Client expects %d bytes, frame has %d' %
(frame_size, da_len)) )
return ('DATA_ARRAY', self._concat_data_cache)
......@@ -964,7 +964,7 @@ class LimaTacoCCDs(PyTango.Device_4Impl, object):
elif triggerMode == Core.ExtTrigReadout:
returnValue = 4
else:
raise Core.Exception( 'Invalid trigger mode: %s' % triggerMode)
raise Core.Exception('Invalid trigger mode: %s' % triggerMode)
return returnValue
#------------------------------------------------------------------
# DevReadValues command:
......@@ -1118,7 +1118,7 @@ class LimaTacoCCDs(PyTango.Device_4Impl, object):
def DevCcdSetMultTrigNbFrames(self, nb_frames):
deb.Param('Setting mult-trig nb_frames: %d' % nb_frames)
if nb_frames < 1:
raise Core.Exception, 'Invalid nb_frames=%d' % nb_frames
raise Core.Exception('Invalid nb_frames=%d' % nb_frames)
self.__mult_trig_nb_frames = nb_frames
#------------------------------------------------------------------
......@@ -1171,7 +1171,7 @@ class LimaTacoCCDs(PyTango.Device_4Impl, object):
#------------------------------------------------------------------
@Core.DEB_MEMBER_FUNCT
def dummy(self, *args) :
raise Core.Exception( 'Taco command not supported for this camera')
raise Core.Exception('Taco command not supported for this camera')
#==================================================================
#
......
......@@ -61,7 +61,7 @@ class RoiCounterDeviceServer(BasePostProcess) :
class _RoiConfigSave(Core.CtConfig.ModuleTypeCallback) :
def __init__(self,cnt):
Core.CtConfig.ModuleTypeCallback.__init__(self,"RoiCounters")
Core.CtConfig.ModuleTypeCallback.__init__(self,b"RoiCounters")
self.__cnt = weakref.ref(cnt)
def store(self) :
cnt = self.__cnt()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment