summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/COW.py
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-06-20 12:08:07 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-02 15:41:37 +0100
commitef1de9ecaf73e28234d284b79ec45e084d0f0c53 (patch)
tree417f87922c1a2fa4a3bbd4b35e0772221f96641e /bitbake/lib/bb/COW.py
parent20dc452614c991d1a4f5b7dcc1307cd03cba0c55 (diff)
downloadpoky-ef1de9ecaf73e28234d284b79ec45e084d0f0c53.tar.gz
Apply some 2to3 refactorings
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/COW.py')
-rw-r--r--bitbake/lib/bb/COW.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/COW.py b/bitbake/lib/bb/COW.py
index 23a2cae2b4..6917ec378a 100644
--- a/bitbake/lib/bb/COW.py
+++ b/bitbake/lib/bb/COW.py
@@ -82,7 +82,7 @@ class COWDictMeta(COWMeta):
82 print("Warning: Doing a copy because %s is a mutable type." % key, file=cls.__warn__) 82 print("Warning: Doing a copy because %s is a mutable type." % key, file=cls.__warn__)
83 try: 83 try:
84 value = value.copy() 84 value = value.copy()
85 except AttributeError, e: 85 except AttributeError as e:
86 value = copy.copy(value) 86 value = copy.copy(value)
87 setattr(cls, nkey, value) 87 setattr(cls, nkey, value)
88 return value 88 return value
@@ -106,7 +106,7 @@ class COWDictMeta(COWMeta):
106 raise AttributeError("key %s does not exist." % key) 106 raise AttributeError("key %s does not exist." % key)
107 107
108 return value 108 return value
109 except AttributeError, e: 109 except AttributeError as e:
110 if not default is cls.__getmarker__: 110 if not default is cls.__getmarker__:
111 return default 111 return default
112 112
@@ -239,7 +239,7 @@ if __name__ == "__main__":
239 239
240 try: 240 try:
241 b['dict2'] 241 b['dict2']
242 except KeyError, e: 242 except KeyError as e:
243 print("Okay!") 243 print("Okay!")
244 244
245 a['set'] = COWSetBase() 245 a['set'] = COWSetBase()