From bdfb073bca972f7933b4cda246941cfe29fc830b Mon Sep 17 00:00:00 2001 From: Ruud Date: Sun, 26 Aug 2012 14:14:57 +0200 Subject: [PATCH] Catch filetime error. fix #741 --- couchpotato/core/plugins/scanner/main.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/couchpotato/core/plugins/scanner/main.py b/couchpotato/core/plugins/scanner/main.py index 7e47ed9..0bc4768 100644 --- a/couchpotato/core/plugins/scanner/main.py +++ b/couchpotato/core/plugins/scanner/main.py @@ -303,7 +303,15 @@ class Scanner(Plugin): break if file_too_new: - log.info('Files seem to be still unpacking or just unpacked (created on %s), ignoring for now: %s', (time.ctime(file_time[0]), identifier)) + try: + time_string = time.ctime(file_time[0]) + except: + try: + time_string = time.ctime(file_time[1]) + except: + time_string = 'unknown' + + log.info('Files seem to be still unpacking or just unpacked (created on %s), ignoring for now: %s', (time_string, identifier)) # Delete the unsorted list del group['unsorted_files']