From 20dc5a132aed4079db3ec3e51cff694dfe706401 Mon Sep 17 00:00:00 2001 From: Marcel Date: Tue, 16 Apr 2019 15:28:18 +0200 Subject: [PATCH] [minor] removed old unused code --- pylot/core/util/event.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pylot/core/util/event.py b/pylot/core/util/event.py index de407c87..c3a71d30 100644 --- a/pylot/core/util/event.py +++ b/pylot/core/util/event.py @@ -67,8 +67,10 @@ class Event(ObsPyEvent): notesfile = self.get_notes_path() if os.path.isfile(notesfile): with open(notesfile) as infile: - path = str(infile.readlines()[0].split('\n')[0]) - text = '[eventInfo: ' + path + ']' + lines = infile.readlines() + if not lines: + return + text = lines[0] self.addNotes(text) try: datetime = UTCDateTime(path.split('/')[-1])