From 6b3a19bb45e28d7a7062cc24715a27f1195634df Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Wed, 20 Apr 2016 16:33:55 -0500 Subject: [PATCH] Remove some more prints in the hopes it will help Mac. --- calibre-plugin/dialogs.py | 3 +-- calibre-plugin/fff_plugin.py | 2 +- calibre-plugin/jobs.py | 3 +-- fanficfare/epubutils.py | 6 ++---- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/calibre-plugin/dialogs.py b/calibre-plugin/dialogs.py index 28c2c16e..569bb4ce 100644 --- a/calibre-plugin/dialogs.py +++ b/calibre-plugin/dialogs.py @@ -647,8 +647,7 @@ class LoopProgressDialog(QProgressDialog): except Exception as e: book['good']=False book['comment']=unicode(e) - logger.error("Exception: %s:%s"%(book,unicode(e))) - traceback.print_exc() + logger.error("Exception: %s:%s"%(book,unicode(e)),exc_info=True) self.updateStatus() self.i += 1 diff --git a/calibre-plugin/fff_plugin.py b/calibre-plugin/fff_plugin.py index 5e60a168..64eecaae 100644 --- a/calibre-plugin/fff_plugin.py +++ b/calibre-plugin/fff_plugin.py @@ -2076,7 +2076,7 @@ class FanFicFarePlugin(InterfaceAction): # (template,regexp,setting) = map( lambda x: x.strip(), line.split("=>") ) for (template,regexp,setting) in configuration.get_generate_cover_settings(): value = Template(template).safe_substitute(book['all_metadata']).encode('utf8') - print("%s(%s) => %s => %s"%(template,value,regexp,setting)) + # print("%s(%s) => %s => %s"%(template,value,regexp,setting)) if re.search(regexp,value): setting_name = setting break diff --git a/calibre-plugin/jobs.py b/calibre-plugin/jobs.py index b1c17e0b..ec50efa4 100644 --- a/calibre-plugin/jobs.py +++ b/calibre-plugin/jobs.py @@ -319,8 +319,7 @@ def do_download_for_worker(book,options,merge,notification=lambda x,y:x): book['comment']=unicode(e) book['icon']='dialog_error.png' book['status'] = _('Error') - logger.info("Exception: %s:%s"%(book,unicode(e))) - traceback.print_exc() + logger.info("Exception: %s:%s"%(book,unicode(e)),exc_info=True) #time.sleep(10) return book diff --git a/fanficfare/epubutils.py b/fanficfare/epubutils.py index 62647f82..25dd3f0c 100644 --- a/fanficfare/epubutils.py +++ b/fanficfare/epubutils.py @@ -84,8 +84,7 @@ def get_update_data(inputio, oldcover = (oldcoverhtmlhref,oldcoverhtmltype,oldcoverhtmldata,oldcoverimghref,oldcoverimgtype,oldcoverimgdata) except Exception as e: logger.warn("Cover Image %s not found"%src) - logger.warn("Exception: %s"%(unicode(e))) - traceback.print_exc() + logger.warn("Exception: %s"%(unicode(e)),exc_info=True) filecount = 0 soups = [] # list of xhmtl blocks @@ -127,8 +126,7 @@ def get_update_data(inputio, # originally. if newsrc != u'OEBPS/failedtoload': logger.warn("Image %s not found!\n(originally:%s)"%(newsrc,longdesc)) - logger.warn("Exception: %s"%(unicode(e))) - traceback.print_exc() + logger.warn("Exception: %s"%(unicode(e)),exc_info=True) bodysoup = soup.find('body') # ffdl epubs have chapter title h3 h3 = bodysoup.find('h3')