Browse Source

Just use logging

dev
Laurent Kislaire 3 years ago
parent
commit
fea54ab603
  1. 6
      pyfbx/__main__.py

6
pyfbx/__main__.py

@ -39,7 +39,7 @@ def output(fbx, command, json_output, send_url):
try:
r = requests.post(send_url, json=res)
except BaseException as exc:
print("While sending to {}, got exception {}".format(send_url, exc))
log.error("While sending to {}, got exception {}".format(send_url, exc))
elif json_output:
print(json.dumps(res))
else:
@ -96,10 +96,10 @@ def main():
break
time.sleep(args.delay)
except RequestError as exc:
print("Got Http Error {}".format(exc))
log.error("Got Http Error {}".format(exc))
return 2
except ResponseError as exc:
print("Got Response Error {}".format(exc))
log.error("Got Response Error {}".format(exc))
return 1
return 0

Loading…
Cancel
Save