aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch/__init__.py
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-04-12 08:14:11 -0700
committerChris Larson <chris_larson@mentor.com>2010-04-12 08:14:13 -0700
commit83674a3a5564ecb1f9d2c9b2d5b1eeb3c31272ab (patch)
treecd1e77dccf1eaee4b6bdf88778340be6c617255c /lib/bb/fetch/__init__.py
parentd39ab776e7ceaefc8361150151cf0892dcb70d9c (diff)
downloadbitbake-83674a3a5564ecb1f9d2c9b2d5b1eeb3c31272ab.tar.gz
Kill unnecessary usages of the types module
types.IntType -> int types.StringType -> basestring ... Also moves our ImmutableTypes tuple into our own namespace. Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'lib/bb/fetch/__init__.py')
-rw-r--r--lib/bb/fetch/__init__.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/bb/fetch/__init__.py b/lib/bb/fetch/__init__.py
index d7fb41a00..74606af02 100644
--- a/lib/bb/fetch/__init__.py
+++ b/lib/bb/fetch/__init__.py
@@ -126,8 +126,7 @@ def uri_replace(uri, uri_find, uri_replace, d):
for i in uri_find_decoded:
loc = uri_find_decoded.index(i)
result_decoded[loc] = uri_decoded[loc]
- import types
- if type(i) == types.StringType:
+ if isinstance(i, basestring):
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: