- global cable_autoscan_nimtype
- try:
- nim_name = nimmanager.getNimName(nim_idx)
- if nim_name is not None and nim_name != "":
- device_id = ""
- nim_name = nim_name.split(' ')[-1][4:-1]
- if nim_name == 'TT3L10':
- try:
- device_id = GetDeviceId('TT3L10', nim_idx)
- device_id = "--device=%s" % (device_id)
- except Exception, err:
- print "GetCommand ->", err
- device_id = "--device=0"
-# print nim_idx, nim_name, cable_autoscan_nimtype[nim_name], device_id
- command = "%s %s" % (cable_autoscan_nimtype[nim_name], device_id)
- return command
- except Exception, err:
- print "GetCommand ->", err
- return "tda1002x"
+ global cable_autoscan_nimtype
+ try:
+ nim_name = nimmanager.getNimName(nim_idx)
+ if nim_name is not None and nim_name != "":
+ device_id = ""
+ nim_name = nim_name.split(' ')[-1][4:-1]
+ if nim_name == 'TT3L10':
+ try:
+ device_id = GetDeviceId('TT3L10', nim_idx)
+ device_id = "--device=%s" % (device_id)
+ except Exception, err:
+ print "GetCommand ->", err
+ device_id = "--device=0"
+# print nim_idx, nim_name, cable_autoscan_nimtype[nim_name], device_id
+ command = "%s %s" % (cable_autoscan_nimtype[nim_name], device_id)
+ return command
+ except Exception, err:
+ print "GetCommand ->", err
+ return "tda1002x"