Closed raghunayak closed 8 years ago
I am trying to use application publishCommand function & getting "global name 'result' is not defined error".
Below is the sample code
def start(device_config_file): try: try: # Read from the configuration file device_options = ibmiotf.application.ParseConfigFile(device_config_file) client = ibmiotf.application.Client(device_options) except Exception as e: print(str(e)) sys.exit() client.deviceEventCallback = deviceEventCallback client.connect() mydata = {'switch-led': 'false'} while 1: client.publishCommand("RasberryPi", "b827ebe3db7a", "command", "json", mydata) time.sleep(1) client.disconnect() except Exception as e: print(str(e)) sys.exit()
Closing the issue as pull request is merged & issue is fixed in master.
I am trying to use application publishCommand function & getting "global name 'result' is not defined error".
Below is the sample code