summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2014-10-08 16:06:35 +0100
committerRichard Ipsum <richard.ipsum@codethink.co.uk>2014-11-04 12:40:54 +0000
commit44d355e048ab427aed0af0d01e72feb8e7b06b0b (patch)
tree848ce1f6daf00f81e5fa513f86bf263874307860
parented30a8c155087160c6ec72673f0ce464b224587a (diff)
downloadimport-44d355e048ab427aed0af0d01e72feb8e7b06b0b.tar.gz
ahem, more fixes >.>
-rwxr-xr-ximport/pip.to_lorry8
1 files changed, 2 insertions, 6 deletions
diff --git a/import/pip.to_lorry b/import/pip.to_lorry
index bbb3b24..46f7dd1 100755
--- a/import/pip.to_lorry
+++ b/import/pip.to_lorry
@@ -38,11 +38,9 @@ def is_repo(url):
vcss = [('git', 'clone'), ('hg', 'clone'),
('svn', 'checkout'), ('bzr', 'branch')]
- # make temp directory
- tempdir = tempfile.mkdtemp()
-
- # run commands from there
for (vcs, vcs_command) in vcss:
+ tempdir = tempfile.mkdtemp()
+
p = subprocess.Popen([vcs, vcs_command, url], stdout=subprocess.PIPE,
stderr=subprocess.PIPE, cwd=tempdir)
@@ -114,8 +112,6 @@ metadata = fetch_package_metadata(package_name)
info = metadata['info']
if 'home_page' in info:
- # TODO: detect if git repo, if so then great lorry from here
- print(info['home_page'])
if is_repo(info['home_page']):
# lorry this thing
print('not implemented yet: lorry from ', info['home_page'])