summaryrefslogtreecommitdiffstats
path: root/Lib/whichdb.py
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2007-08-16 14:35:24 (GMT)
committerSkip Montanaro <skip@pobox.com>2007-08-16 14:35:24 (GMT)
commit7a98be2efbdc44a6271e3bf6117a1e6c77828414 (patch)
tree64b6306494f992605ef5bd854dfc9e4922f8b967 /Lib/whichdb.py
parentc5aba174477a4bdbda31d859ce407c6ee7cef293 (diff)
downloadcpython-7a98be2efbdc44a6271e3bf6117a1e6c77828414.zip
cpython-7a98be2efbdc44a6271e3bf6117a1e6c77828414.tar.gz
cpython-7a98be2efbdc44a6271e3bf6117a1e6c77828414.tar.bz2
Remove RISCOS support
Diffstat (limited to 'Lib/whichdb.py')
-rw-r--r--Lib/whichdb.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/whichdb.py b/Lib/whichdb.py
index 752bbb1..ca9c736 100644
--- a/Lib/whichdb.py
+++ b/Lib/whichdb.py
@@ -30,18 +30,18 @@ def whichdb(filename):
# Check for dbm first -- this has a .pag and a .dir file
try:
- f = io.open(filename + os.extsep + "pag", "rb")
+ f = io.open(filename + ".pag", "rb")
f.close()
# dbm linked with gdbm on OS/2 doesn't have .dir file
if not (dbm.library == "GNU gdbm" and sys.platform == "os2emx"):
- f = io.open(filename + os.extsep + "dir", "rb")
+ f = io.open(filename + ".dir", "rb")
f.close()
return "dbm"
except IOError:
# some dbm emulations based on Berkeley DB generate a .db file
# some do not, but they should be caught by the dbhash checks
try:
- f = io.open(filename + os.extsep + "db", "rb")
+ f = io.open(filename + ".db", "rb")
f.close()
# guarantee we can actually open the file using dbm
# kind of overkill, but since we are dealing with emulations
@@ -56,12 +56,12 @@ def whichdb(filename):
# Check for dumbdbm next -- this has a .dir and a .dat file
try:
# First check for presence of files
- os.stat(filename + os.extsep + "dat")
- size = os.stat(filename + os.extsep + "dir").st_size
+ os.stat(filename + ".dat")
+ size = os.stat(filename + ".dir").st_size
# dumbdbm files with no keys are empty
if size == 0:
return "dumbdbm"
- f = io.open(filename + os.extsep + "dir", "rb")
+ f = io.open(filename + ".dir", "rb")
try:
if f.read(1) in (b"'", b'"'):
return "dumbdbm"