Code

add missing file
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Tue, 23 Feb 2010 22:54:59 +0000 (22:54 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Tue, 23 Feb 2010 22:54:59 +0000 (22:54 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4466 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/anypy/dbm_.py [new file with mode: 0644]

diff --git a/roundup/anypy/dbm_.py b/roundup/anypy/dbm_.py
new file mode 100644 (file)
index 0000000..093a2f1
--- /dev/null
@@ -0,0 +1,12 @@
+# In Python 3 the "anydbm" module was renamed to be "dbm" which is now a
+# package containing the various implementations. The "wichdb" module's
+# whichdb() function was moved to the new "dbm" module.
+
+try:
+    # old school first because <3 had a "dbm" module too...
+    import anydbm
+    from whichdb import whichdb
+except ImportError:
+    # python 3+
+    import dbm as anydbm
+    whichdb = anydbm.whichdb