diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2013-07-07 11:15:08 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2013-07-07 11:15:08 (GMT) |
commit | b08495bbcfea7440f56bbc786b64cbaadaeb604f (patch) | |
tree | 0811cb8fc23461ea59609d09cf152a9325048bd9 /Lib/dbm | |
parent | 331c3fd874333b71bd315c0541349fcaebabfdcb (diff) | |
download | cpython-b08495bbcfea7440f56bbc786b64cbaadaeb604f.zip cpython-b08495bbcfea7440f56bbc786b64cbaadaeb604f.tar.gz cpython-b08495bbcfea7440f56bbc786b64cbaadaeb604f.tar.bz2 |
#17198: Fix a NameError in the dbm module. Patch by Valentina Mukhamedzhanova.
Diffstat (limited to 'Lib/dbm')
-rw-r--r-- | Lib/dbm/__init__.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/dbm/__init__.py b/Lib/dbm/__init__.py index 813a29d..a783fde 100644 --- a/Lib/dbm/__init__.py +++ b/Lib/dbm/__init__.py @@ -44,6 +44,11 @@ _modules = {} error = (error, IOError) +try: + from dbm import ndbm +except ImportError: + ndbm = None + def open(file, flag='r', mode=0o666): """Open or create database at path given by *file*. |