mirror of
https://github.com/internetarchive/warcprox.git
synced 2025-01-18 13:22:09 +01:00
addressed odd python 3 issue where whichdb cannot recognize an ndbm unless that module has been previously imported. Also removed file_location variable as it wasn't being used afterall
This commit is contained in:
parent
e01de5aad3
commit
44ea56d65c
@ -10,7 +10,9 @@ deduplication database or a playback index database, but it is a generic tool.
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
import dbm
|
import dbm
|
||||||
|
from dbm import ndbm
|
||||||
whichdb = dbm.whichdb
|
whichdb = dbm.whichdb
|
||||||
|
|
||||||
except:
|
except:
|
||||||
import anydbm
|
import anydbm
|
||||||
dbm = anydbm
|
dbm = anydbm
|
||||||
@ -25,7 +27,6 @@ if __name__ == "__main__":
|
|||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
filename = sys.argv[1]
|
filename = sys.argv[1]
|
||||||
file_location = sys.argv[1]
|
|
||||||
which = whichdb(filename)
|
which = whichdb(filename)
|
||||||
|
|
||||||
# if which returns none and the file does not exist, print usage line
|
# if which returns none and the file does not exist, print usage line
|
||||||
|
Loading…
x
Reference in New Issue
Block a user