[Sugar-devel] [PATCH sugar-base 08/17] PEP8 cleanup: don't use has_key()
Sascha Silbe
sascha-pgp at silbe.org
Sat Oct 16 07:30:21 EDT 2010
has_key() has been deprecated for quite some time now.
Signed-off-by: Sascha Silbe <sascha-pgp at silbe.org>
diff --git a/maint-helper.py b/maint-helper.py
index b963e7f..4f8a0be 100755
--- a/maint-helper.py
+++ b/maint-helper.py
@@ -79,7 +79,7 @@ def cmd_build_snapshot():
print 'Update NEWS.sugar...'
- if os.environ.has_key('SUGAR_NEWS'):
+ if 'SUGAR_NEWS' in os.environ:
sugar_news_path = os.environ['SUGAR_NEWS']
if os.path.isfile(sugar_news_path):
f = open(sugar_news_path, 'r')
@@ -166,7 +166,7 @@ def check_licenses(path, license, missing):
miss_license = False
if miss_license:
- if not missing.has_key(license):
+ if license not in missing:
missing[license] = []
missing[license].append(full_path)
--
1.7.1
More information about the Sugar-devel
mailing list