mirror of
https://github.com/nvbn/thefuck.git
synced 2025-01-31 02:01:13 +00:00
Fix compatibility with Python > 3.5
This commit is contained in:
parent
c7e7e1d884
commit
7c9dd44c32
@ -14,8 +14,10 @@ try:
|
|||||||
module_spec.loader.exec_module(module)
|
module_spec.loader.exec_module(module)
|
||||||
return module
|
return module
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from imp import load_source
|
try:
|
||||||
|
from importlib.machinery import SourceFileLoader as load_source # Fix compat with Python 3.5+
|
||||||
|
except ImportError: # Fallback for really old (< 3.3) Python versions
|
||||||
|
from imp import load_source # type: ignore
|
||||||
|
|
||||||
class Settings(dict):
|
class Settings(dict):
|
||||||
def __getattr__(self, item):
|
def __getattr__(self, item):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user