summaryrefslogtreecommitdiff
path: root/morphlib/definitions_repo.py
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2015-09-23 18:14:08 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2015-09-24 11:24:36 +0000
commita751e4fc1ab7b00ae70f12f498d2050a5fb71445 (patch)
tree94bd038495f06a46ade459f72face80bf5ff7392 /morphlib/definitions_repo.py
parentf9c02205608356b4c57611509b574e3874d243a9 (diff)
downloadmorph-sam/python3.tar.gz
Allow Morph code to be run with Python 2.7 and Python 3.4sam/python3
PRETTY BROKEN! Change-Id: I92545c821103eea1316383086e77e6b654f2321c
Diffstat (limited to 'morphlib/definitions_repo.py')
-rw-r--r--morphlib/definitions_repo.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/morphlib/definitions_repo.py b/morphlib/definitions_repo.py
index c1381af6..c0f8d944 100644
--- a/morphlib/definitions_repo.py
+++ b/morphlib/definitions_repo.py
@@ -21,11 +21,16 @@ import cliapp
import contextlib
import logging
import os
-import urlparse
+import sys
import uuid
import morphlib
-import gitdir
+from . import gitdir
+
+if sys.version_info[0] == 2:
+ import urlparse
+else:
+ import urllib.parse as urlparse
class DefinitionsRepoNotFound(cliapp.AppException):