mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
IGN:...
This commit is contained in:
parent
b650764c2a
commit
718ab0963f
@ -1259,12 +1259,12 @@ path_to_ebook to the database.
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
try:
|
try:
|
||||||
sys.exit(main())
|
sys.exit(main())
|
||||||
except:
|
except Exception, err:
|
||||||
if not iswindows: raise
|
if not iswindows: raise
|
||||||
|
tb = traceback.format_exc()
|
||||||
from PyQt4.QtGui import QErrorMessage
|
from PyQt4.QtGui import QErrorMessage
|
||||||
logfile = os.path.join(os.path.expanduser('~'), 'calibre.log')
|
logfile = os.path.join(os.path.expanduser('~'), 'calibre.log')
|
||||||
if os.path.exists(logfile):
|
if os.path.exists(logfile):
|
||||||
log = open(logfile).read()
|
log = open(logfile).read().decode('utf-8', 'ignore')
|
||||||
if log.strip():
|
d = QErrorMessage('<b>Error:</b>%s<br><b>Traceback:</b><br>%s<b>Log:</b><br>'%(unicode(err), unicode(tb), log))
|
||||||
d = QErrorMessage()
|
d.exec_()
|
||||||
d.showMessage(log)
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user