Skip to content

Commit

Permalink
Merge pull request #1 from MikeFalowski/master
Browse files Browse the repository at this point in the history
Problem with the instance names of the created DSes
  • Loading branch information
sergirubio authored Feb 1, 2017
2 parents 57be50c + fc19353 commit ed2c926
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gen_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,13 @@ def create_simulators(filein,instance='',path='',domains={},tango_host='controls
t.dev_class = t.dev_class or d.split('/')[-1]
klass = 'PyStateComposer' if t.dev_class == 'PyStateComposer' else 'SimulatorDS'
server = 'DynamicDS'
instance = '%s%s'%(instance,t.dev_class) if '-' in instance else instance
print('%s/%s:%s , "%s" => %s '%(server,instance,d,t.dev_class,klass))
its_new = ('/'.join(('dserver',server,instance))).lower() not in all_devs or d.lower() not in all_devs
instance_temp = '%s%s'%(instance,t.dev_class) if '-' in instance else instance
print('%s/%s:%s , "%s" => %s '%(server,instance_temp,d,t.dev_class,klass))
its_new = ('/'.join(('dserver',server,instance_temp))).lower() not in all_devs or d.lower() not in all_devs

if its_new or override:
print('writing ... %s(%s)'%(type(t),d))
fandango.tango.add_new_device('%s/%s'%(server,instance),klass,d)
fandango.tango.add_new_device('%s/%s'%(server,instance_temp),klass,d)
for p,v in t.props.items():
if not p.startswith('__'): #p not in ('DynamicCommands','DynamicStates','LoadFromFile','DevicesList') and
fandango.tango.put_device_property(d,p,v)
Expand Down

0 comments on commit ed2c926

Please sign in to comment.