1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-31 00:39:46 +00:00

Apply some 2to3 refactorings

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
Chris Larson
2010-06-20 12:08:07 -07:00
committed by Richard Purdie
parent 20dc452614
commit ef1de9ecaf
11 changed files with 43 additions and 43 deletions
+3 -3
View File
@@ -82,7 +82,7 @@ class COWDictMeta(COWMeta):
print("Warning: Doing a copy because %s is a mutable type." % key, file=cls.__warn__)
try:
value = value.copy()
except AttributeError, e:
except AttributeError as e:
value = copy.copy(value)
setattr(cls, nkey, value)
return value
@@ -106,7 +106,7 @@ class COWDictMeta(COWMeta):
raise AttributeError("key %s does not exist." % key)
return value
except AttributeError, e:
except AttributeError as e:
if not default is cls.__getmarker__:
return default
@@ -239,7 +239,7 @@ if __name__ == "__main__":
try:
b['dict2']
except KeyError, e:
except KeyError as e:
print("Okay!")
a['set'] = COWSetBase()