From 44ea56d65cbe31af35cccf3f5c695c43691851d1 Mon Sep 17 00:00:00 2001 From: Kelsey Hawley Date: Fri, 20 Dec 2013 13:43:49 -0800 Subject: [PATCH] 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 --- bin/dump-anydbm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/dump-anydbm b/bin/dump-anydbm index dce0dc8..83e1872 100755 --- a/bin/dump-anydbm +++ b/bin/dump-anydbm @@ -10,7 +10,9 @@ deduplication database or a playback index database, but it is a generic tool. try: import dbm + from dbm import ndbm whichdb = dbm.whichdb + except: import anydbm dbm = anydbm @@ -25,7 +27,6 @@ if __name__ == "__main__": exit(1) filename = sys.argv[1] - file_location = sys.argv[1] which = whichdb(filename) # if which returns none and the file does not exist, print usage line