diff options
-rwxr-xr-x | morph | 1 | ||||
-rw-r--r-- | morphlib/bins.py | 5 | ||||
-rw-r--r-- | morphlib/bins_tests.py | 2 | ||||
-rw-r--r-- | morphlib/blobs.py | 3 | ||||
-rw-r--r-- | morphlib/cachedir.py | 2 | ||||
-rw-r--r-- | morphlib/cachedir_tests.py | 2 | ||||
-rw-r--r-- | morphlib/execute.py | 3 | ||||
-rw-r--r-- | morphlib/execute_tests.py | 2 | ||||
-rw-r--r-- | morphlib/git.py | 1 | ||||
-rw-r--r-- | morphlib/morphology.py | 2 | ||||
-rw-r--r-- | morphlib/morphology_tests.py | 2 | ||||
-rw-r--r-- | morphlib/morphologyloader.py | 1 | ||||
-rw-r--r-- | morphlib/sourcemanager.py | 4 | ||||
-rw-r--r-- | morphlib/sourcemanager_tests.py | 9 | ||||
-rw-r--r-- | morphlib/stopwatch.py | 7 | ||||
-rw-r--r-- | morphlib/stopwatch_tests.py | 2 | ||||
-rw-r--r-- | morphlib/tempdir.py | 2 | ||||
-rw-r--r-- | morphlib/tempdir_tests.py | 2 | ||||
-rw-r--r-- | morphlib/tester.py | 3 | ||||
-rw-r--r-- | morphlib/util.py | 2 | ||||
-rw-r--r-- | morphlib/util_tests.py | 2 |
21 files changed, 24 insertions, 35 deletions
@@ -22,7 +22,6 @@ import cliapp import logging import os -import urlparse import morphlib from morphlib.morphologyloader import MorphologyLoader diff --git a/morphlib/bins.py b/morphlib/bins.py index cd77a037..b4b5396e 100644 --- a/morphlib/bins.py +++ b/morphlib/bins.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 @@ -25,9 +25,6 @@ import logging import os import re import tarfile -import tempfile - -import morphlib def create_chunk(rootdir, chunk_filename, regexps, ex, diff --git a/morphlib/bins_tests.py b/morphlib/bins_tests.py index 73daff50..c23a22ad 100644 --- a/morphlib/bins_tests.py +++ b/morphlib/bins_tests.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/blobs.py b/morphlib/blobs.py index d02643a6..11f3e937 100644 --- a/morphlib/blobs.py +++ b/morphlib/blobs.py @@ -14,9 +14,6 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -import os - - class Blob(object): @staticmethod diff --git a/morphlib/cachedir.py b/morphlib/cachedir.py index 803c4359..cc528a43 100644 --- a/morphlib/cachedir.py +++ b/morphlib/cachedir.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/cachedir_tests.py b/morphlib/cachedir_tests.py index a4d8d39e..172b7d86 100644 --- a/morphlib/cachedir_tests.py +++ b/morphlib/cachedir_tests.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/execute.py b/morphlib/execute.py index 038a5cfd..fdb9c1c5 100644 --- a/morphlib/execute.py +++ b/morphlib/execute.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 @@ -18,7 +18,6 @@ import cliapp import logging import os import subprocess -import tempfile import morphlib diff --git a/morphlib/execute_tests.py b/morphlib/execute_tests.py index da6f5d49..927ab07f 100644 --- a/morphlib/execute_tests.py +++ b/morphlib/execute_tests.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/git.py b/morphlib/git.py index f9d85c98..d7eba935 100644 --- a/morphlib/git.py +++ b/morphlib/git.py @@ -15,7 +15,6 @@ import logging -import urlparse import binascii import morphlib import os diff --git a/morphlib/morphology.py b/morphlib/morphology.py index 9f9fa06b..2b8c0551 100644 --- a/morphlib/morphology.py +++ b/morphlib/morphology.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/morphology_tests.py b/morphlib/morphology_tests.py index db771fbb..54cdbb18 100644 --- a/morphlib/morphology_tests.py +++ b/morphlib/morphology_tests.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/morphologyloader.py b/morphlib/morphologyloader.py index f59a8ddf..dd2dd183 100644 --- a/morphlib/morphologyloader.py +++ b/morphlib/morphologyloader.py @@ -15,7 +15,6 @@ import StringIO -import urlparse import morphlib diff --git a/morphlib/sourcemanager.py b/morphlib/sourcemanager.py index d30f08ed..c25f7331 100644 --- a/morphlib/sourcemanager.py +++ b/morphlib/sourcemanager.py @@ -20,7 +20,6 @@ import urllib2 import string import morphlib -from morphlib.git import Treeish gitscheme=["git",] @@ -149,7 +148,8 @@ class SourceManager(object): if success: # create the treeish; cache it to avoid loading it twice - treeish = Treeish(gitcache, repo, ref, self.msg) + treeish = morphlib.git.Treeish(gitcache, repo, ref, + self.msg) self.cached_treeishes[(repo, ref)] = treeish else: raise SourceNotFound(repo,ref) diff --git a/morphlib/sourcemanager_tests.py b/morphlib/sourcemanager_tests.py index 1fb0b6c0..87d29f7b 100644 --- a/morphlib/sourcemanager_tests.py +++ b/morphlib/sourcemanager_tests.py @@ -19,7 +19,7 @@ import tempfile import shutil import os import subprocess -from urlparse import urlparse +import urlparse import morphlib @@ -44,7 +44,8 @@ class SourceManagerTests(unittest.TestCase): subprocess.call("./tests/show-dependencies.setup", shell=True, env=env) self.temprepo = self.temprepodir + '/test-repo/' bundle_name = morphlib.sourcemanager.quote_url(self.temprepo) + '.bndl' - subprocess.call("git bundle create %s/%s master" % (self.temprepodir, bundle_name), + subprocess.call("git bundle create %s/%s master" % + (self.temprepodir, bundle_name), shell=True, cwd=self.temprepo) def tearDown(self): @@ -105,7 +106,7 @@ class SourceManagerTests(unittest.TestCase): s = morphlib.sourcemanager.SourceManager(app, tempdir) def wget(url): - path=urlparse(url).path + path=urlparse.urlparse(url).path shutil.copy(path, s.cache_dir) s._wget = wget @@ -124,7 +125,7 @@ class SourceManagerTests(unittest.TestCase): s = morphlib.sourcemanager.SourceManager(app, tempdir) def wget(url): - path=urlparse(url).path + path=urlparse.urlparse(url).path shutil.copy(path, s.cache_dir) s._wget = wget diff --git a/morphlib/stopwatch.py b/morphlib/stopwatch.py index 7446f897..2554a1c9 100644 --- a/morphlib/stopwatch.py +++ b/morphlib/stopwatch.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 @@ -15,8 +15,7 @@ import operator - -from datetime import datetime +import datetime class Stopwatch(object): @@ -28,7 +27,7 @@ class Stopwatch(object): def tick(self, reference_object, name): if not reference_object in self.ticks: self.ticks[reference_object] = {} - self.ticks[reference_object][name] = datetime.now() + self.ticks[reference_object][name] = datetime.datetime.now() def start(self, reference_object): self.tick(reference_object, 'start') diff --git a/morphlib/stopwatch_tests.py b/morphlib/stopwatch_tests.py index 0d4d98d9..460d765f 100644 --- a/morphlib/stopwatch_tests.py +++ b/morphlib/stopwatch_tests.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/tempdir.py b/morphlib/tempdir.py index 1a7c45e0..9780b685 100644 --- a/morphlib/tempdir.py +++ b/morphlib/tempdir.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/tempdir_tests.py b/morphlib/tempdir_tests.py index 4a606eb2..977769b0 100644 --- a/morphlib/tempdir_tests.py +++ b/morphlib/tempdir_tests.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/tester.py b/morphlib/tester.py index e6e17031..569199d7 100644 --- a/morphlib/tester.py +++ b/morphlib/tester.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 @@ -15,7 +15,6 @@ import imp -import logging import os import re import select diff --git a/morphlib/util.py b/morphlib/util.py index b95c0d73..42dbb3af 100644 --- a/morphlib/util.py +++ b/morphlib/util.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/util_tests.py b/morphlib/util_tests.py index e65d4507..8fdb051a 100644 --- a/morphlib/util_tests.py +++ b/morphlib/util_tests.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 |