diff --git a/cps/server.py b/cps/server.py index d27fe239..ed5b63c7 100644 --- a/cps/server.py +++ b/cps/server.py @@ -194,7 +194,7 @@ class WebServer(object): os.execv(sys.executable, arguments) return True - def _killServer(self, ignored_signum, ignored_frame): + def _killServer(self, __, ___): self.stop() def stop(self, restart=False): diff --git a/cps/services/worker.py b/cps/services/worker.py index 543d438f..b72c0636 100644 --- a/cps/services/worker.py +++ b/cps/services/worker.py @@ -8,7 +8,7 @@ try: import queue except ImportError: import Queue as queue -from datetime import datetime, timedelta +from datetime import datetime from collections import namedtuple from cps import logger diff --git a/cps/tasks/convert.py b/cps/tasks/convert.py index ba905047..a9cbfbd2 100644 --- a/cps/tasks/convert.py +++ b/cps/tasks/convert.py @@ -193,7 +193,7 @@ class TaskConvert(CalibreTask): ele = ele.decode('utf-8') log.debug(ele.strip('\n')) if not ele.startswith('Traceback') and not ele.startswith(' File'): - error_message = _("Calibre failed with error: %(error)s", ele.strip('\n')) + error_message = _("Calibre failed with error: %(error)s", error=ele.strip('\n')) return check, error_message @property diff --git a/cps/tasks/mail.py b/cps/tasks/mail.py index 3b2db6eb..f83cc4fa 100644 --- a/cps/tasks/mail.py +++ b/cps/tasks/mail.py @@ -175,6 +175,8 @@ class TaskEmail(CalibreTask): text = e.smtp_error.decode('utf-8').replace("\n", '. ') elif hasattr(e, "message"): text = e.message + elif hasattr(e, "args"): + text = '\n'.join(e.args) else: log.exception(e) text = '' diff --git a/test/Calibre-Web TestSummary.html b/test/Calibre-Web TestSummary.html index 98894833..10e2e0ee 100755 --- a/test/Calibre-Web TestSummary.html +++ b/test/Calibre-Web TestSummary.html @@ -36,12 +36,16 @@
Start Time: 2020-08-29 11:15:36
+ +Start Time: 2020-08-30 15:47:09
+Stop Time: 2020-08-29 12:34:46
+ +Stop Time: 2020-08-30 17:06:27
+Traceback (most recent call last): - File "/home/matthias/Entwicklung/calibre-web-test/test/test_cover_edit_books.py", line 89, in test_upload_jpg + File "/home/matthias/Entwicklung/calibre-web-test/test/test_cover_edit_books.py", line 91, in test_upload_jpg self.assertTrue(self.check_element_on_page((By.ID, 'flash_alert'))) AssertionError: False is not true
Traceback (most recent call last): - File "/home/matthias/Entwicklung/calibre-web-test/test/test_edit_books.py", line 734, in test_upload_cover_hdd + File "/home/matthias/Entwicklung/calibre-web-test/test/test_edit_books.py", line 735, in test_upload_cover_hdd self.assertTrue(False, "Browser-Cache Problem: Old Cover is displayed instead of New Cover") AssertionError: False is not true : Browser-Cache Problem: Old Cover is displayed instead of New Cover