mirror of
https://github.com/noDRM/DeDRM_tools.git
synced 2025-01-24 08:14:31 +06:00
Merge pull request #75 from directionless/errormessages
Error Messages - one fix, one adddition
This commit is contained in:
commit
d67e05cf04
@ -448,6 +448,8 @@ class MobiBook:
|
|||||||
goodpids.append(pid[0:-2])
|
goodpids.append(pid[0:-2])
|
||||||
elif len(pid)==8:
|
elif len(pid)==8:
|
||||||
goodpids.append(pid)
|
goodpids.append(pid)
|
||||||
|
else:
|
||||||
|
print u"Warning: PID {0} has wrong number of digits".format(pid)
|
||||||
|
|
||||||
if self.crypto_type == 1:
|
if self.crypto_type == 1:
|
||||||
t1_keyvec = 'QDCVEPMU675RUBSZ'
|
t1_keyvec = 'QDCVEPMU675RUBSZ'
|
||||||
@ -530,7 +532,7 @@ def cli_main():
|
|||||||
stripped_file = getUnencryptedBook(infile, pidlist)
|
stripped_file = getUnencryptedBook(infile, pidlist)
|
||||||
file(outfile, 'wb').write(stripped_file)
|
file(outfile, 'wb').write(stripped_file)
|
||||||
except DrmException, e:
|
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 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
@ -448,6 +448,8 @@ class MobiBook:
|
|||||||
goodpids.append(pid[0:-2])
|
goodpids.append(pid[0:-2])
|
||||||
elif len(pid)==8:
|
elif len(pid)==8:
|
||||||
goodpids.append(pid)
|
goodpids.append(pid)
|
||||||
|
else:
|
||||||
|
print u"Warning: PID {0} has wrong number of digits".format(pid)
|
||||||
|
|
||||||
if self.crypto_type == 1:
|
if self.crypto_type == 1:
|
||||||
t1_keyvec = 'QDCVEPMU675RUBSZ'
|
t1_keyvec = 'QDCVEPMU675RUBSZ'
|
||||||
@ -530,7 +532,7 @@ def cli_main():
|
|||||||
stripped_file = getUnencryptedBook(infile, pidlist)
|
stripped_file = getUnencryptedBook(infile, pidlist)
|
||||||
file(outfile, 'wb').write(stripped_file)
|
file(outfile, 'wb').write(stripped_file)
|
||||||
except DrmException, e:
|
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 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
@ -448,6 +448,8 @@ class MobiBook:
|
|||||||
goodpids.append(pid[0:-2])
|
goodpids.append(pid[0:-2])
|
||||||
elif len(pid)==8:
|
elif len(pid)==8:
|
||||||
goodpids.append(pid)
|
goodpids.append(pid)
|
||||||
|
else:
|
||||||
|
print u"Warning: PID {0} has wrong number of digits".format(pid)
|
||||||
|
|
||||||
if self.crypto_type == 1:
|
if self.crypto_type == 1:
|
||||||
t1_keyvec = 'QDCVEPMU675RUBSZ'
|
t1_keyvec = 'QDCVEPMU675RUBSZ'
|
||||||
@ -530,7 +532,7 @@ def cli_main():
|
|||||||
stripped_file = getUnencryptedBook(infile, pidlist)
|
stripped_file = getUnencryptedBook(infile, pidlist)
|
||||||
file(outfile, 'wb').write(stripped_file)
|
file(outfile, 'wb').write(stripped_file)
|
||||||
except DrmException, e:
|
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 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user