2021-12-13 Fred Gleason <fredg@paravelsystems.com>

* Added a 'LogLock()' type class to the 'rivwebpyapi' API.
	* Modified the 'rivwebpyapi.LockLog()' call to return
	a  'rivwebpyapi.LogLock' object.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2021-12-13 16:29:05 -05:00
parent da9cb3eae3
commit d276d58aac
3 changed files with 21 additions and 11 deletions

View File

@@ -78,7 +78,7 @@ if((operation!='CREATE')and(not guid)):
#
webapi=rivwebpyapi.rivwebpyapi(url=url,username=username,password=password)
try:
result=webapi.LockLog(log_name=log_name,operation=operation,guid=guid)
lock=webapi.LockLog(log_name=log_name,operation=operation,guid=guid)
except rivwebpyapi.RivWebPyError as err:
eprint('*** ERROR ***')
eprint('Response Code: '+str(err.responseCode))
@@ -90,12 +90,6 @@ except rivwebpyapi.RivWebPyError as err:
#
# Display the result
#
for key in lock.values():
print(key+': '+str(lock.values()[key]))
print('')
print('RESULT:')
print('result: '+str(result['result']))
print('logName: '+str(result['logName']))
print('lockGuid: '+str(result['lockGuid']))
print('address: '+str(result['address']))
print('lockTimeout: '+str(result['address']))
print('')