mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-01 16:11:18 +03:00
Ignore backups of edited Journal files
This commit is contained in:
parent
00f9dfb8dd
commit
178b0b506e
@ -165,7 +165,7 @@ class EDLogs(FileSystemEventHandler):
|
|||||||
|
|
||||||
def on_created(self, event):
|
def on_created(self, event):
|
||||||
# watchdog callback, e.g. client (re)started.
|
# watchdog callback, e.g. client (re)started.
|
||||||
if not event.is_directory and basename(event.src_path).startswith('Journal.'):
|
if not event.is_directory and basename(event.src_path).startswith('Journal.') and basename(event.src_path).endswith('.log'):
|
||||||
self.logfile = event.src_path
|
self.logfile = event.src_path
|
||||||
|
|
||||||
def worker(self):
|
def worker(self):
|
||||||
@ -197,7 +197,7 @@ class EDLogs(FileSystemEventHandler):
|
|||||||
else:
|
else:
|
||||||
# Poll
|
# Poll
|
||||||
try:
|
try:
|
||||||
logfiles = sorted([x for x in listdir(self.currentdir) if x.startswith('Journal.')])
|
logfiles = sorted([x for x in listdir(self.currentdir) if x.startswith('Journal.') and x.endswith('.log')])
|
||||||
newlogfile = logfiles and join(self.currentdir, logfiles[-1]) or None
|
newlogfile = logfiles and join(self.currentdir, logfiles[-1]) or None
|
||||||
except:
|
except:
|
||||||
if __debug__: print_exc()
|
if __debug__: print_exc()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user