Skip to content
Snippets Groups Projects
Commit 36430a7d authored by Alán Muñoz's avatar Alán Muñoz
Browse files

change(aliby): Replace prints -> self._log

parent 6d5e3447
No related branches found
No related tags found
No related merge requests found
......@@ -240,7 +240,7 @@ class Signal(BridgeH5):
f.visititems(self.store_signal_url)
except Exception as e:
print("Error visiting h5: {}".format(e))
self._log("Exception when visiting h5: {}".format(e), "exception")
return self._available
......@@ -289,7 +289,7 @@ class Signal(BridgeH5):
return df
except Exception as e:
print(f"Could not fetch dataset {dataset}")
self._log(f"Could not fetch dataset {dataset}", "error")
raise e
def get_merges(self):
......
......@@ -493,9 +493,8 @@ class Tiler(StepABC):
return None
def get_traps_timepoint(self, *args, **kwargs):
#
print(
DeprecationWarning("Deprecated:Use get_tiles_timepoint instead.")
self._log(
"get_trap_timepoints is deprecated; get_tiles_timepoint instead."
)
return self.get_tiles_timepoint(*args, **kwargs)
......
......@@ -32,6 +32,7 @@ New grammar
- Tables are assumed to end with an empty line.
"""
import logging
import typing as t
from pathlib import PosixPath
......@@ -229,7 +230,9 @@ def parse_from_grammar(filepath: str, grammar: t.Dict):
subkey = "_".join((key, subkey))
d[subkey] = parse_x(header, **subvalues)
except Exception as e:
print(f"Parsing failed for key {key}")
logging.getLogger("aliby").critical(
f"Parsing failed for key {key}"
)
raise (e)
return d
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment