added arg option for force script to run

This commit is contained in:
2021-11-29 10:57:35 -05:00
parent ac38b3cea6
commit 4ffc51ded6

View File

@@ -28,4 +28,9 @@ def request(resource, api_key, method='GET', data=None):
except:
logger.debug('Request Returned Text: {}'.format(r.text))
return {'ok': r.ok, 'status_code': r.status_code, 'response': r.text}
raise ValueError(r)
raise ValueError(r)
parser = argparse.ArgumentParser(description='Get DHCP WAN after reboot if backup is down and update CARP and Gateway')
parser.add_argument('-f', '--force', action='store_true', help='Force script to run, even if backup router is online')
args = parser.parse_args()