has_key() is uglier and slower than "if key in..."

This commit is contained in:
Daniel Martí 2013-03-13 17:56:17 +01:00
parent f73857fe71
commit 7bb4d5865b
5 changed files with 27 additions and 27 deletions

View file

@ -56,7 +56,7 @@ def check_tags(app, sdk_path):
return (None, "Can't use Tags with no builds defined")
manifest = build_dir
if app['builds'][-1].has_key('subdir'):
if 'subdir' in app['builds'][-1]:
manifest = os.path.join(manifest, app['builds'][-1]['subdir'])
manifest = os.path.join(manifest, 'AndroidManifest.xml')
@ -109,7 +109,7 @@ def check_repomanifest(app, sdk_path):
return (None, "Can't use RepoManifest with no builds defined")
manifest = build_dir
if app['builds'][-1].has_key('subdir'):
if 'subdir' in app['builds'][-1]:
manifest = os.path.join(manifest, app['builds'][-1]['subdir'])
manifest = os.path.join(manifest, 'AndroidManifest.xml')