Merged new caliblur theme

Fix for new users created
Fix for options to the calibre-converter
Only the first 300 chars are logged for the emailbody (spamming of logfile is prevented)
Added class to "Random" header
This commit is contained in:
Ozzieisaacs
2018-12-27 10:53:19 +01:00
parent 677264950d
commit d0fd1a4601
12 changed files with 1170 additions and 284 deletions

View File

@ -99,7 +99,7 @@ class emailbase():
def send(self, strg):
"""Send `strg' to the server."""
if self.debuglevel > 0:
print('send:', repr(strg), file=sys.stderr)
print('send:', repr(strg[:300]), file=sys.stderr)
if hasattr(self, 'sock') and self.sock:
try:
if self.transferSize:
@ -278,7 +278,9 @@ class WorkerThread(threading.Thread):
command = [web.ub.config.config_converterpath, (file_path + format_old_ext),
(file_path + format_new_ext)]
if web.ub.config.config_calibre:
command.append(web.ub.config.config_calibre)
parameters = web.ub.config.config_calibre.split(" ")
for param in parameters:
command.append(param)
if sys.version_info < (3, 0):
command = [x.encode(sys.getfilesystemencoding()) for x in command]