[_modules] strip_proto moved from a module to another
authorArthur Lutz <arthur.lutz@logilab.fr>
Thu, 03 Dec 2015 17:58:22 +0100
changeset 64 64b6455771b5
parent 63 c0d109dada36
child 65 e2e1874eae79
[_modules] strip_proto moved from a module to another
_modules/cubicweb.py
--- a/_modules/cubicweb.py	Thu Jul 30 12:16:27 2015 +0200
+++ b/_modules/cubicweb.py	Thu Dec 03 17:58:22 2015 +0100
@@ -17,7 +17,12 @@
 from ConfigParser import ConfigParser
 
 # Import salt libs
-from salt.utils import check_or_die, strip_proto
+from salt.utils import check_or_die
+try: 
+    from salt.utils.url import strip_proto
+except ImportError:
+    # legacy  < 2015.8
+    from salt.utils import strip_proto
 from salt.exceptions import CommandNotFoundError
 
 log = logging.getLogger(__name__)