summaryrefslogtreecommitdiff
path: root/Lib/whichdb.py
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2001-03-01 04:13:51 +0000
committerSkip Montanaro <skip@pobox.com>2001-03-01 04:13:51 +0000
commita1e6aeb18d75442cba22c2658b3d2c708184b33c (patch)
treeb764629ba1f016b99dd1344571d69b49736ccf55 /Lib/whichdb.py
parent168802fafb70cc0b52f63504952ae33653634903 (diff)
downloadcpython-a1e6aeb18d75442cba22c2658b3d2c708184b33c.tar.gz
move import into function to avoid having to add an __all__ list...
Diffstat (limited to 'Lib/whichdb.py')
-rw-r--r--Lib/whichdb.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/whichdb.py b/Lib/whichdb.py
index 4396321e99..1f120998d4 100644
--- a/Lib/whichdb.py
+++ b/Lib/whichdb.py
@@ -1,7 +1,5 @@
"""Guess which db package to use to open a db file."""
-import struct
-
def whichdb(filename):
"""Guess which db package to use to open a db file.
@@ -15,6 +13,8 @@ def whichdb(filename):
database using that module may still fail.
"""
+ import struct
+
# Check for dbm first -- this has a .pag and a .dir file
try:
f = open(filename + ".pag", "rb")