mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
Version 2.2.9:
Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
@ -55,14 +55,14 @@ class Client(object):
|
||||
logging.exception("Other error while opening websocket (%s) with parameter %s", e, s)
|
||||
|
||||
|
||||
def run(self, command, verbose_errors=True):
|
||||
for _ in range(0, 2):
|
||||
try:
|
||||
r = requests.post("%s/session" % self.url, auth=self.auth, json={'cmd': command})
|
||||
except requests.exceptions.ConnectionError as e:
|
||||
logging.exception("Request connection error (%s) while running command (%s)", e, command)
|
||||
sleep(1) # Sleep for 1-s before trying a second time
|
||||
else:
|
||||
break
|
||||
def run(self, command, verbose_errors=True):
|
||||
for _ in range(0, 2):
|
||||
try:
|
||||
r = requests.post("%s/session" % self.url, auth=self.auth, json={'cmd': command})
|
||||
except requests.exceptions.ConnectionError as e:
|
||||
logging.exception("Request connection error (%s) while running command (%s)", e, command)
|
||||
sleep(1) # Sleep for 1-s before trying a second time
|
||||
else:
|
||||
break
|
||||
|
||||
return decode(r, verbose_errors=verbose_errors)
|
||||
return decode(r, verbose_errors=verbose_errors)
|
||||
|
Reference in New Issue
Block a user