From c2b5a617285733053f867c3fdda2179a65ccbe4c Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 3 Nov 2009 23:14:53 +0000 Subject: bitbake: Sync module import cleanups back from bitbake trunk Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch/__init__.py | 8 +------- bitbake/lib/bb/fetch/bzr.py | 1 - bitbake/lib/bb/fetch/cvs.py | 2 +- bitbake/lib/bb/fetch/git.py | 3 +-- bitbake/lib/bb/fetch/hg.py | 2 +- bitbake/lib/bb/fetch/local.py | 2 +- bitbake/lib/bb/fetch/perforce.py | 3 +-- bitbake/lib/bb/fetch/ssh.py | 2 -- bitbake/lib/bb/fetch/svn.py | 2 +- bitbake/lib/bb/fetch/wget.py | 2 +- 10 files changed, 8 insertions(+), 19 deletions(-) (limited to 'bitbake/lib/bb/fetch') diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py index a7fc1af0c..2191c284e 100644 --- a/bitbake/lib/bb/fetch/__init__.py +++ b/bitbake/lib/bb/fetch/__init__.py @@ -24,16 +24,11 @@ BitBake build tools. # # Based on functions from the base bb module, Copyright 2003 Holger Schurig -import os, re, fcntl +import os, re import bb from bb import data from bb import persist_data -try: - import cPickle as pickle -except ImportError: - import pickle - class FetchError(Exception): """Exception raised when a download fails""" @@ -65,7 +60,6 @@ def uri_replace(uri, uri_find, uri_replace, d): result_decoded[loc] = uri_decoded[loc] import types if type(i) == types.StringType: - import re if (re.match(i, uri_decoded[loc])): result_decoded[loc] = re.sub(i, uri_replace_decoded[loc], uri_decoded[loc]) if uri_find_decoded.index(i) == 2: diff --git a/bitbake/lib/bb/fetch/bzr.py b/bitbake/lib/bb/fetch/bzr.py index b23e9eef8..b27fb63d0 100644 --- a/bitbake/lib/bb/fetch/bzr.py +++ b/bitbake/lib/bb/fetch/bzr.py @@ -29,7 +29,6 @@ import bb from bb import data from bb.fetch import Fetch from bb.fetch import FetchError -from bb.fetch import MissingParameterError from bb.fetch import runfetchcmd class Bzr(Fetch): diff --git a/bitbake/lib/bb/fetch/cvs.py b/bitbake/lib/bb/fetch/cvs.py index aa55ad8bf..d8bd4eaf7 100644 --- a/bitbake/lib/bb/fetch/cvs.py +++ b/bitbake/lib/bb/fetch/cvs.py @@ -26,7 +26,7 @@ BitBake build tools. #Based on functions from the base bb module, Copyright 2003 Holger Schurig # -import os, re +import os import bb from bb import data from bb.fetch import Fetch diff --git a/bitbake/lib/bb/fetch/git.py b/bitbake/lib/bb/fetch/git.py index 54dafec51..c81193774 100644 --- a/bitbake/lib/bb/fetch/git.py +++ b/bitbake/lib/bb/fetch/git.py @@ -20,11 +20,10 @@ BitBake 'Fetch' git implementation # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -import os, re +import os import bb from bb import data from bb.fetch import Fetch -from bb.fetch import FetchError from bb.fetch import runfetchcmd class Git(Fetch): diff --git a/bitbake/lib/bb/fetch/hg.py b/bitbake/lib/bb/fetch/hg.py index b5fd8fecd..08cb61fc2 100644 --- a/bitbake/lib/bb/fetch/hg.py +++ b/bitbake/lib/bb/fetch/hg.py @@ -24,7 +24,7 @@ BitBake 'Fetch' implementation for mercurial DRCS (hg). # # Based on functions from the base bb module, Copyright 2003 Holger Schurig -import os, re +import os import sys import bb from bb import data diff --git a/bitbake/lib/bb/fetch/local.py b/bitbake/lib/bb/fetch/local.py index 54d598ae8..577774e59 100644 --- a/bitbake/lib/bb/fetch/local.py +++ b/bitbake/lib/bb/fetch/local.py @@ -25,7 +25,7 @@ BitBake build tools. # # Based on functions from the base bb module, Copyright 2003 Holger Schurig -import os, re +import os import bb from bb import data from bb.fetch import Fetch diff --git a/bitbake/lib/bb/fetch/perforce.py b/bitbake/lib/bb/fetch/perforce.py index 2fb38b419..394f5a225 100644 --- a/bitbake/lib/bb/fetch/perforce.py +++ b/bitbake/lib/bb/fetch/perforce.py @@ -25,12 +25,11 @@ BitBake build tools. # # Based on functions from the base bb module, Copyright 2003 Holger Schurig -import os, re +import os import bb from bb import data from bb.fetch import Fetch from bb.fetch import FetchError -from bb.fetch import MissingParameterError class Perforce(Fetch): def supports(self, url, ud, d): diff --git a/bitbake/lib/bb/fetch/ssh.py b/bitbake/lib/bb/fetch/ssh.py index 81a9892dc..68e6fdb1d 100644 --- a/bitbake/lib/bb/fetch/ssh.py +++ b/bitbake/lib/bb/fetch/ssh.py @@ -37,11 +37,9 @@ IETF secsh internet draft: # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. import re, os -import bb from bb import data from bb.fetch import Fetch from bb.fetch import FetchError -from bb.fetch import MissingParameterError __pattern__ = re.compile(r''' diff --git a/bitbake/lib/bb/fetch/svn.py b/bitbake/lib/bb/fetch/svn.py index aead1629b..eef9862a8 100644 --- a/bitbake/lib/bb/fetch/svn.py +++ b/bitbake/lib/bb/fetch/svn.py @@ -23,7 +23,7 @@ BitBake 'Fetch' implementation for svn. # # Based on functions from the base bb module, Copyright 2003 Holger Schurig -import os, re +import os import sys import bb from bb import data diff --git a/bitbake/lib/bb/fetch/wget.py b/bitbake/lib/bb/fetch/wget.py index d1ae6cb65..a0dca9404 100644 --- a/bitbake/lib/bb/fetch/wget.py +++ b/bitbake/lib/bb/fetch/wget.py @@ -25,7 +25,7 @@ BitBake build tools. # # Based on functions from the base bb module, Copyright 2003 Holger Schurig -import os, re +import os import bb from bb import data from bb.fetch import Fetch -- cgit v1.2.3