Commit 55414ae8 by devttys0

Improved timestamp exception handling.

parent d8bd753a
...@@ -674,7 +674,9 @@ class Magic(object): ...@@ -674,7 +674,9 @@ class Magic(object):
try: try:
ts = datetime.datetime.utcfromtimestamp(dvalue) ts = datetime.datetime.utcfromtimestamp(dvalue)
dvalue = ts.strftime("%Y-%m-%d %H:%M:%S") dvalue = ts.strftime("%Y-%m-%d %H:%M:%S")
except OSError: except KeyboardInterrupt as e:
raise e
except Exception:
dvalue = "invalid timestamp" dvalue = "invalid timestamp"
# Generate the tuple for the format string # Generate the tuple for the format string
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment