Fix an error message, and add another

This commit is contained in:
seph 2016-03-04 22:27:57 -05:00
parent cfc13db6c5
commit a5197a6abb
3 changed files with 9 additions and 3 deletions

View File

@ -448,6 +448,8 @@ class MobiBook:
goodpids.append(pid[0:-2])
elif len(pid)==8:
goodpids.append(pid)
else:
print u"Warning: PID {0} has wrong number of digits".format(pid)
if self.crypto_type == 1:
t1_keyvec = 'QDCVEPMU675RUBSZ'
@ -530,7 +532,7 @@ def cli_main():
stripped_file = getUnencryptedBook(infile, pidlist)
file(outfile, 'wb').write(stripped_file)
except DrmException, e:
print u"MobiDeDRM v{0} Error: {0:s}".format(__version__,e.args[0])
print u"MobiDeDRM v{0} Error: {1:s}".format(__version__,e.args[0])
return 1
return 0

View File

@ -448,6 +448,8 @@ class MobiBook:
goodpids.append(pid[0:-2])
elif len(pid)==8:
goodpids.append(pid)
else:
print u"Warning: PID {0} has wrong number of digits".format(pid)
if self.crypto_type == 1:
t1_keyvec = 'QDCVEPMU675RUBSZ'
@ -530,7 +532,7 @@ def cli_main():
stripped_file = getUnencryptedBook(infile, pidlist)
file(outfile, 'wb').write(stripped_file)
except DrmException, e:
print u"MobiDeDRM v{0} Error: {0:s}".format(__version__,e.args[0])
print u"MobiDeDRM v{0} Error: {1:s}".format(__version__,e.args[0])
return 1
return 0

View File

@ -448,6 +448,8 @@ class MobiBook:
goodpids.append(pid[0:-2])
elif len(pid)==8:
goodpids.append(pid)
else:
print u"Warning: PID {0} has wrong number of digits".format(pid)
if self.crypto_type == 1:
t1_keyvec = 'QDCVEPMU675RUBSZ'
@ -530,7 +532,7 @@ def cli_main():
stripped_file = getUnencryptedBook(infile, pidlist)
file(outfile, 'wb').write(stripped_file)
except DrmException, e:
print u"MobiDeDRM v{0} Error: {0:s}".format(__version__,e.args[0])
print u"MobiDeDRM v{0} Error: {1:s}".format(__version__,e.args[0])
return 1
return 0