mirror of
https://github.com/noDRM/DeDRM_tools.git
synced 2025-10-23 23:07:47 -04:00
Old style exceptions are syntax errors in Python 3
Switch to new style exceptions which work on both Python 2 and Python 3.
This commit is contained in:
parent
3f644ddfd6
commit
1eaee6a0a8
1 changed files with 2 additions and 2 deletions
|
|
@ -2018,7 +2018,7 @@ def decryptBook(userkey, inpath, outpath):
|
||||||
# help construct to make sure the method runs to the end
|
# help construct to make sure the method runs to the end
|
||||||
try:
|
try:
|
||||||
serializer.dump(outf)
|
serializer.dump(outf)
|
||||||
except Exception, e:
|
except Exception as e:
|
||||||
print("error writing pdf: {0}".format(e.args[0]))
|
print("error writing pdf: {0}".format(e.args[0]))
|
||||||
return 2
|
return 2
|
||||||
return 0
|
return 0
|
||||||
|
|
@ -2138,7 +2138,7 @@ def gui_main():
|
||||||
self.status['text'] = "Decrypting..."
|
self.status['text'] = "Decrypting..."
|
||||||
try:
|
try:
|
||||||
decrypt_status = decryptBook(userkey, inpath, outpath)
|
decrypt_status = decryptBook(userkey, inpath, outpath)
|
||||||
except Exception, e:
|
except Exception as e:
|
||||||
self.status['text'] = "Error; {0}".format(e.args[0])
|
self.status['text'] = "Error; {0}".format(e.args[0])
|
||||||
return
|
return
|
||||||
if decrypt_status == 0:
|
if decrypt_status == 0:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue