def create_device_module(self, connect_string, device_name, module_name): mod_connect = None try: helper = Helper(connect_string) helper.create_device_module(device_name, module_name) print("create_device_module: ({}/{}) returned: ({})".format(device_name, module_name, 'OK')) mod_connect = helper.get_module_connection_string(device_name, module_name) except: print(Fore.RED + "Exception creating device: {}/{}".format(device_name, module_name), file=sys.stderr) traceback.print_exc() print(Fore.RESET, file=sys.stderr) return mod_connect
def create_device_module(self, connect_string, device_name, module_name): mod_connect = "" try: helper = Helper(connect_string) helper.create_device_module(device_name, module_name) mod_connect = helper.get_module_connection_string( device_name, module_name) except: print(Fore.RED + "Exception creating module: {}/{}".format( device_name, module_name), file=sys.stderr) traceback.print_exc() sys.exit(-1) return mod_connect