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.
This commit is contained in:
parent
9e92201d82
commit
9dc7c92c86
@ -73,15 +73,15 @@ class NetPos(plugins.Plugin):
|
|||||||
try:
|
try:
|
||||||
geo_data = self._get_geo_data(np_file) # returns json obj
|
geo_data = self._get_geo_data(np_file) # returns json obj
|
||||||
except requests.exceptions.RequestException as req_e:
|
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
|
self.skip += np_file
|
||||||
continue
|
continue
|
||||||
except json.JSONDecodeError as js_e:
|
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
|
self.skip += np_file
|
||||||
continue
|
continue
|
||||||
except OSError as os_e:
|
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
|
self.skip += np_file
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user