Skip to content

Commit 91df3a4

Browse files
committed
Fix importlib import problem
importlib does exist in 2.7, it just doesn't have the reload function.
1 parent 9fa5bb7 commit 91df3a4

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/test_folium.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212
import os
1313
import warnings
1414
import sys
15-
try:
16-
import importlib
17-
except ImportError:
18-
import imp as importlib
1915

2016
import branca.element
2117

@@ -36,6 +32,10 @@
3632
except ImportError:
3733
import mock
3834

35+
import importlib
36+
if not hasattr(importlib, 'reload'):
37+
import imp as importlib
38+
3939

4040
rootpath = os.path.abspath(os.path.dirname(__file__))
4141

0 commit comments

Comments
 (0)