diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-04-12 08:14:11 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-07-02 15:41:33 +0100 |
commit | 22a21799059b156d8858cbf32acb7c2aefb9a23b (patch) | |
tree | 1e0e83c86fe04e30576ddfb34577940596f8d809 /bitbake/lib/bb/fetch | |
parent | 1180bab54e2879401f3586c91a48174191a1ee8b (diff) | |
download | poky-22a21799059b156d8858cbf32acb7c2aefb9a23b.tar.gz |
Kill unnecessary usages of the types module
types.IntType -> int
types.StringType -> basestring
...
Also moves our ImmutableTypes tuple into our own namespace.
(Bitbake rev: 83674a3a5564ecb1f9d2c9b2d5b1eeb3c31272ab)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/fetch')
-rw-r--r-- | bitbake/lib/bb/fetch/__init__.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py index fec9c6ed79..f52b0acfc7 100644 --- a/bitbake/lib/bb/fetch/__init__.py +++ b/bitbake/lib/bb/fetch/__init__.py | |||
@@ -126,8 +126,7 @@ def uri_replace(uri, uri_find, uri_replace, d): | |||
126 | for i in uri_find_decoded: | 126 | for i in uri_find_decoded: |
127 | loc = uri_find_decoded.index(i) | 127 | loc = uri_find_decoded.index(i) |
128 | result_decoded[loc] = uri_decoded[loc] | 128 | result_decoded[loc] = uri_decoded[loc] |
129 | import types | 129 | if isinstance(i, basestring): |
130 | if type(i) == types.StringType: | ||
131 | if (re.match(i, uri_decoded[loc])): | 130 | if (re.match(i, uri_decoded[loc])): |
132 | result_decoded[loc] = re.sub(i, uri_replace_decoded[loc], uri_decoded[loc]) | 131 | result_decoded[loc] = re.sub(i, uri_replace_decoded[loc], uri_decoded[loc]) |
133 | if uri_find_decoded.index(i) == 2: | 132 | if uri_find_decoded.index(i) == 2: |