From 9dc7c92c8655f55eba2f1f3f11b8a8a28696a95e Mon Sep 17 00:00:00 2001 From: Alex Muthmann <deveth0@users.noreply.github.com> Date: Tue, 5 Nov 2019 21:54:37 +0100 Subject: [PATCH] Additional Logging for net-pos plugin to simplify search for broken files I currently have some broken net-pos files on my device and the logging does not provide enough information to find the invalid files. I'd suggest to log the path. --- pwnagotchi/plugins/default/net-pos.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pwnagotchi/plugins/default/net-pos.py b/pwnagotchi/plugins/default/net-pos.py index ab14e26..e0fa002 100644 --- a/pwnagotchi/plugins/default/net-pos.py +++ b/pwnagotchi/plugins/default/net-pos.py @@ -73,15 +73,15 @@ class NetPos(plugins.Plugin): try: geo_data = self._get_geo_data(np_file) # returns json obj except requests.exceptions.RequestException as req_e: - logging.error("NET-POS: %s", req_e) + logging.error("NET-POS: %s - RequestException: %s", np_file, req_e) self.skip += np_file continue except json.JSONDecodeError as js_e: - logging.error("NET-POS: %s", js_e) + logging.error("NET-POS: %s - JSONDecodeError: %s", np_file, js_e) self.skip += np_file continue except OSError as os_e: - logging.error("NET-POS: %s", os_e) + logging.error("NET-POS: %s - OSError: %s", np_file, os_e) self.skip += np_file continue