examples/collect_inventory.py
def finished(f):
    """
    Callback executed when the inv collection work for a device is completed.
    """
    global remaining, lock
    try:
        device_name = f.result()
        with lock:
            remaining -= 1
            print("Finished processing device: %s; %d remaining" % (device_name, remaining))
    except Exception as e:
        import traceback
        traceback.print_exception(sys.exc_info()[0],
                                  sys.exc_info()[1],
                                  sys.exc_info()[2])
        print(e.message)

    Callback executed when the inv collection work for a device is completed.
    
Callback executed when the inv collection work for a device is completed.
Callback executed when the inv collection work for a device is completed .
def finished(f):
    global remaining, lock
    try:
        device_name = f.result()
        with lock:
            remaining -= 1
            print("Finished processing device: %s; %d remaining" % (device_name, remaining))
    except Exception as e:
        import traceback
        traceback.print_exception(sys.exc_info()[0],
                                  sys.exc_info()[1],
                                  sys.exc_info()[2])
        print(e.message)
def finished ( f ) : global remaining , lock try : device_name = f . result ( ) with lock : remaining -= 1 print ( "Finished processing device: %s; %d remaining" % ( device_name , remaining ) ) except Exception as e : import traceback traceback . print_exception ( sys . exc_info ( ) [ 0 ] , sys . exc_info ( ) [ 1 ] , sys . exc_info ( ) [ 2 ] ) print ( e . message )
Callback executed when the inv collection work for a device is completed.
Callback executed when the inv collection work for a device is completed .
"""
    Callback executed when the inv collection work for a device is completed.
    """
f