mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-20 01:28:56 +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 os
|
||||||
import pickle
|
import pickle
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
@ -16,10 +16,10 @@ from warnings import warn
|
|||||||
|
|
||||||
DEVNULL = open(os.devnull, 'w')
|
DEVNULL = open(os.devnull, 'w')
|
||||||
|
|
||||||
shelve_open_errors = (dbm.error, )
|
shelve_open_errors = (anydbm.error, )
|
||||||
if six.PY2:
|
#if six.PY2:
|
||||||
import gdbm
|
# import gdbm
|
||||||
shelve_open_errors += (gdbm.error, )
|
# shelve_open_errors += (gdbm.error, )
|
||||||
|
|
||||||
|
|
||||||
def memoize(fn):
|
def memoize(fn):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user