From 4d88a4782706edee3a03ce51dc0cd60bfe4107cb Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 11 May 2009 06:12:40 +0000 Subject: [fetchers] Make pyflakes happy by removing these import statements We don't use the modules, no need to import them here. --- lib/bb/fetch/__init__.py | 8 +------- lib/bb/fetch/bzr.py | 1 - lib/bb/fetch/cvs.py | 2 +- lib/bb/fetch/git.py | 3 +-- lib/bb/fetch/hg.py | 2 +- lib/bb/fetch/local.py | 2 +- lib/bb/fetch/perforce.py | 3 +-- lib/bb/fetch/ssh.py | 2 -- lib/bb/fetch/svk.py | 2 +- lib/bb/fetch/svn.py | 2 +- lib/bb/fetch/wget.py | 2 +- 11 files changed, 9 insertions(+), 20 deletions(-) (limited to 'lib') diff --git a/lib/bb/fetch/__init__.py b/lib/bb/fetch/__init__.py index cdddcc948..6a931368d 100644 --- a/lib/bb/fetch/__init__.py +++ b/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/lib/bb/fetch/bzr.py b/lib/bb/fetch/bzr.py index b23e9eef8..b27fb63d0 100644 --- a/lib/bb/fetch/bzr.py +++ b/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/lib/bb/fetch/cvs.py b/lib/bb/fetch/cvs.py index aa55ad8bf..d8bd4eaf7 100644 --- a/lib/bb/fetch/cvs.py +++ b/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/lib/bb/fetch/git.py b/lib/bb/fetch/git.py index 8006466cf..dbf8f3aa2 100644 --- a/lib/bb/fetch/git.py +++ b/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/lib/bb/fetch/hg.py b/lib/bb/fetch/hg.py index b87fd0fbe..52c4200e3 100644 --- a/lib/bb/fetch/hg.py +++ b/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/lib/bb/fetch/local.py b/lib/bb/fetch/local.py index 54d598ae8..577774e59 100644 --- a/lib/bb/fetch/local.py +++ b/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/lib/bb/fetch/perforce.py b/lib/bb/fetch/perforce.py index 2fb38b419..394f5a225 100644 --- a/lib/bb/fetch/perforce.py +++ b/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/lib/bb/fetch/ssh.py b/lib/bb/fetch/ssh.py index 81a9892dc..68e6fdb1d 100644 --- a/lib/bb/fetch/ssh.py +++ b/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/lib/bb/fetch/svk.py b/lib/bb/fetch/svk.py index d863ccb6e..e73e824af 100644 --- a/lib/bb/fetch/svk.py +++ b/lib/bb/fetch/svk.py @@ -25,7 +25,7 @@ This implementation is for svk. It is based on the svn implementation # # 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/lib/bb/fetch/svn.py b/lib/bb/fetch/svn.py index aead1629b..eef9862a8 100644 --- a/lib/bb/fetch/svn.py +++ b/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/lib/bb/fetch/wget.py b/lib/bb/fetch/wget.py index 0008a2870..36617fbba 100644 --- a/lib/bb/fetch/wget.py +++ b/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 1.2.3-korg