def update_firmware(filename, host=None, admin_username=None, admin_password=None):
 if os.path.exists(filename):
  return _update_firmware('update -f {0}'.format(filename), host=None, admin_username=None, admin_password=None)
 else:
  raise CommandExecutionError('Unable to find firmware file {0}'.format(filename))

def update_firmware ( filename , host = None , admin_username = None , admin_password = None ) : if os . path . exists ( filename ) : return _update_firmware ( 'update -f {0}' . format ( filename ) , host = None , admin_username = None , admin_password = None ) else : raise CommandExecutionError ( 'Unable to find firmware file {0}' . format ( filename ) )
updates firmware using local firmware file .