mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-14 14:48:49 +00:00
Changed dbm to anydbm for better not-unix support
Like it's written in the python docs (https://docs.python.org/2/library/anydbm.html) the anydbm is a generic interface of the dbm database that is supported from the most systems I testet the modification on windows and it is running well TODO: - Test on Linux - Test on OSX
This commit is contained in:
parent
fee874cddc
commit
3c7e8a69c3
@ -1,4 +1,4 @@
|
||||
import dbm
|
||||
import anydbm
|
||||
import os
|
||||
import pickle
|
||||
import pkg_resources
|
||||
@ -16,10 +16,10 @@ from warnings import warn
|
||||
|
||||
DEVNULL = open(os.devnull, 'w')
|
||||
|
||||
shelve_open_errors = (dbm.error, )
|
||||
if six.PY2:
|
||||
import gdbm
|
||||
shelve_open_errors += (gdbm.error, )
|
||||
shelve_open_errors = (anydbm.error, )
|
||||
#if six.PY2:
|
||||
# import gdbm
|
||||
# shelve_open_errors += (gdbm.error, )
|
||||
|
||||
|
||||
def memoize(fn):
|
||||
|
Loading…
x
Reference in New Issue
Block a user