Skip to content

Commit ed2c926

Browse files
authored
Merge pull request #1 from MikeFalowski/master
Problem with the instance names of the created DSes
2 parents 57be50c + fc19353 commit ed2c926

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

gen_simulation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,13 +230,13 @@ def create_simulators(filein,instance='',path='',domains={},tango_host='controls
230230
t.dev_class = t.dev_class or d.split('/')[-1]
231231
klass = 'PyStateComposer' if t.dev_class == 'PyStateComposer' else 'SimulatorDS'
232232
server = 'DynamicDS'
233-
instance = '%s%s'%(instance,t.dev_class) if '-' in instance else instance
234-
print('%s/%s:%s , "%s" => %s '%(server,instance,d,t.dev_class,klass))
235-
its_new = ('/'.join(('dserver',server,instance))).lower() not in all_devs or d.lower() not in all_devs
233+
instance_temp = '%s%s'%(instance,t.dev_class) if '-' in instance else instance
234+
print('%s/%s:%s , "%s" => %s '%(server,instance_temp,d,t.dev_class,klass))
235+
its_new = ('/'.join(('dserver',server,instance_temp))).lower() not in all_devs or d.lower() not in all_devs
236236

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

0 commit comments

Comments
 (0)