From 1566cf73bf3b07aa14ebdd5f2045f0137d254ce3 Mon Sep 17 00:00:00 2001 From: dogoncouch Date: Thu, 5 Apr 2018 17:36:17 -0400 Subject: [PATCH] Update backup time zone behavior --- logdissect/core.py | 4 +++- logdissect/parsers/type.py | 2 +- logdissect/utils.py | 2 -- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/logdissect/core.py b/logdissect/core.py index ff98421..ebb69f5 100644 --- a/logdissect/core.py +++ b/logdissect/core.py @@ -174,7 +174,9 @@ def load_inputs(self): else: fullpath = os.path.abspath(str(f)) self.input_files.append(fullpath) - else: return 1 + else: + print('File '+ f + ' not found') + return 1 # Parsing modules: def list_parsers(self, *args): diff --git a/logdissect/parsers/type.py b/logdissect/parsers/type.py index 9e94129..976a0e1 100644 --- a/logdissect/parsers/type.py +++ b/logdissect/parsers/type.py @@ -105,7 +105,7 @@ def parse_file(self, sourcepath): entry['year'] = str(entryyear) if self.tzone: entry['tzone'] = self.tzone - elif not 'tzone' in entry.keys(): + else: entry['tzone'] = self.backuptzone entry = logdissect.utils.get_utc_date(entry) entry['raw_text'] = ourline diff --git a/logdissect/utils.py b/logdissect/utils.py index dcaba98..a563709 100644 --- a/logdissect/utils.py +++ b/logdissect/utils.py @@ -124,8 +124,6 @@ def convert_unix_datestamp(entry): entry['tstamp'] = str(timestamp.strftime('%H%M%S.%f')) entry['numeric_date_stamp'] = entry['year'] + entry['month'] + \ entry['day'] + entry['tstamp'] - print(entry['year'] + entry['month'] + \ - entry['day'] + entry['tstamp']) return entry