summaryrefslogtreecommitdiff
path: root/morphlib
diff options
context:
space:
mode:
authorJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-01-19 12:30:27 +0000
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-01-19 12:39:10 +0000
commit2c9ebfe3b37dfda9fcf6882dbda8cb14e581e538 (patch)
treecee795ea0577a41208741f522dc5af5cd64c4e9a /morphlib
parent0bfeb10ace73a559734cf7e34063e9ff1b8f525f (diff)
downloadmorph-2c9ebfe3b37dfda9fcf6882dbda8cb14e581e538.tar.gz
Fix coding style, update copyrights, drop unused imports.
Diffstat (limited to 'morphlib')
-rw-r--r--morphlib/builder.py1
-rw-r--r--morphlib/git.py2
-rw-r--r--morphlib/sourcemanager.py6
-rw-r--r--morphlib/sourcemanager_tests.py29
4 files changed, 19 insertions, 19 deletions
diff --git a/morphlib/builder.py b/morphlib/builder.py
index 3ec7f740..d1585953 100644
--- a/morphlib/builder.py
+++ b/morphlib/builder.py
@@ -17,6 +17,7 @@
import json
import logging
import os
+import urlparse
import morphlib
diff --git a/morphlib/git.py b/morphlib/git.py
index 2253e6b5..8260312f 100644
--- a/morphlib/git.py
+++ b/morphlib/git.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2011 Codethink Limited
+# Copyright (C) 2011-2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/morphlib/sourcemanager.py b/morphlib/sourcemanager.py
index 73b1c72b..a887f6e0 100644
--- a/morphlib/sourcemanager.py
+++ b/morphlib/sourcemanager.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2011 Codethink Limited
+# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,13 +14,9 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-import json
-import logging
import os
import urlparse
-import urllib
import urllib2
-import errno
import string
import morphlib
diff --git a/morphlib/sourcemanager_tests.py b/morphlib/sourcemanager_tests.py
index 0c24f30d..65664e07 100644
--- a/morphlib/sourcemanager_tests.py
+++ b/morphlib/sourcemanager_tests.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2011 Codethink Limited
+# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,15 +14,11 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-import json
-import StringIO
import unittest
import tempfile
import shutil
import os
-import urllib
from urlparse import urlparse
-from tempfile import mkdtemp
import morphlib
@@ -44,7 +40,8 @@ class SourceManagerTests(unittest.TestCase):
tempdir = tempfile.mkdtemp()
s = morphlib.sourcemanager.SourceManager(tempdir, DummyApp())
- t = s.get_treeish(os.getcwd(),'41ee528492db9bd41604311b100da5a871098b3a')
+ t = s.get_treeish(os.getcwd(),
+ '41ee528492db9bd41604311b100da5a871098b3a')
assert(t.sha1 == '41ee528492db9bd41604311b100da5a871098b3a')
shutil.rmtree(tempdir)
@@ -53,11 +50,13 @@ class SourceManagerTests(unittest.TestCase):
tempdir = tempfile.mkdtemp()
s = morphlib.sourcemanager.SourceManager(tempdir, DummyApp())
- t = s.get_treeish(os.getcwd(),'41ee528492db9bd41604311b100da5a871098b3a')
+ t = s.get_treeish(os.getcwd(),
+ '41ee528492db9bd41604311b100da5a871098b3a')
assert(t.sha1 == '41ee528492db9bd41604311b100da5a871098b3a')
s = morphlib.sourcemanager.SourceManager(tempdir, DummyApp())
- t = s.get_treeish(os.getcwd(),'41ee528492db9bd41604311b100da5a871098b3a')
+ t = s.get_treeish(os.getcwd(),
+ '41ee528492db9bd41604311b100da5a871098b3a')
assert(t.sha1 == '41ee528492db9bd41604311b100da5a871098b3a')
shutil.rmtree(tempdir)
@@ -66,7 +65,7 @@ class SourceManagerTests(unittest.TestCase):
tempdir = tempfile.mkdtemp()
s = morphlib.sourcemanager.SourceManager(tempdir, DummyApp())
- t = s.get_treeish(os.getcwd(),'master')
+ t = s.get_treeish(os.getcwd(), 'master')
assert(t.ref == 'refs/heads/master')
shutil.rmtree(tempdir)
@@ -76,7 +75,8 @@ class SourceManagerTests(unittest.TestCase):
bundle_server_loc = tempdir+'/bundle_server'
os.mkdir(bundle_server_loc)
bundle_name = morphlib.sourcemanager.quote_url(os.getcwd()) + '.bndl'
- shutil.copy(os.getcwd() +'/testdata/morph.bndl', bundle_server_loc + '/' +bundle_name)
+ shutil.copy(os.getcwd() +'/testdata/morph.bndl',
+ bundle_server_loc + '/' +bundle_name)
app = DummyApp()
app.settings['bundle-server'] = 'file://' + bundle_server_loc
@@ -89,7 +89,8 @@ class SourceManagerTests(unittest.TestCase):
s._wget = wget
- t = s.get_treeish(os.getcwd(),'41ee528492db9bd41604311b100da5a871098b3a')
+ t = s.get_treeish(os.getcwd(),
+ '41ee528492db9bd41604311b100da5a871098b3a')
assert(t.sha1 == '41ee528492db9bd41604311b100da5a871098b3a')
shutil.rmtree(tempdir)
@@ -107,7 +108,8 @@ class SourceManagerTests(unittest.TestCase):
shutil.copy(path, s.source_cache_dir)
s._wget = wget
- self.assertRaises(morphlib.sourcemanager.SourceNotFound, s.get_treeish, 'asdf','41ee528492db9bd41604311b100da5a871098b3a')
+ self.assertRaises(morphlib.sourcemanager.SourceNotFound, s.get_treeish,
+ 'asdf','41ee528492db9bd41604311b100da5a871098b3a')
shutil.rmtree(tempdir)
@@ -119,7 +121,8 @@ class SourceManagerTests(unittest.TestCase):
s = morphlib.sourcemanager.SourceManager(tempdir, app)
- t = s.get_treeish(os.getcwd(),'41ee528492db9bd41604311b100da5a871098b3a')
+ t = s.get_treeish(os.getcwd(),
+ '41ee528492db9bd41604311b100da5a871098b3a')
assert(t.sha1 == '41ee528492db9bd41604311b100da5a871098b3a')
shutil.rmtree(tempdir)