Fix importlib import problem
importlib does exist in 2.7, it just doesn't have the reload function.
@@ -12,10 +12,6 @@ import json
import os
import warnings
import sys
-try:
- import importlib
-except ImportError:
- import imp as importlib
import branca.element
@@ -36,6 +32,10 @@ try:
except ImportError:
import mock
+import importlib
+if not hasattr(importlib, 'reload'):
+ import imp as importlib
+
rootpath = os.path.abspath(os.path.dirname(__file__))
