aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Spiers <git@adamspiers.org>2018-05-17 16:01:31 +0100
committerAdam Spiers <git@adamspiers.org>2018-05-17 16:01:31 +0100
commit0c601035d65d5040daa1f48369d75c647a61ba52 (patch)
tree58b0304b2e9c22503eac9f910be60406efe9945e
parent7923bdd7e639c60434085510a982c8c56053cee0 (diff)
downloadgit-deps-0c601035d65d5040daa1f48369d75c647a61ba52.tar.gz
fix gitfile-handler to work on Python 3
-rwxr-xr-xgit_deps/handler.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/git_deps/handler.py b/git_deps/handler.py
index 572ed84..656ea3e 100755
--- a/git_deps/handler.py
+++ b/git_deps/handler.py
@@ -9,7 +9,11 @@ import re
import subprocess
import sys
import urllib
-from urlparse import urlparse
+
+try:
+ from urllib.parse import urlparse # Python 3
+except ImportError:
+ from urlparse import urlparse # Python 2
from git_deps.utils import abort