Use 'in' instead of deprecated has_key()
authorMatt Turner <mattst88@gmail.com>
Sat, 8 Dec 2012 06:14:02 +0000 (22:14 -0800)
committerMatt Turner <mattst88@gmail.com>
Sun, 13 Jan 2013 08:10:17 +0000 (00:10 -0800)
commitd2eb7ae20c1bbadc5ca8a896f8c3e2de9aff099f
treebc8e161c2c407eeaca428138219cbdfcfa497c0c
parenta7fb196f07860afdf09f3601bdda9d801d807040
Use 'in' instead of deprecated has_key()

Since Python 2.2 'in' has been preferred to has_key() since it is
shorter, more readable, and faster. has_key() has been deprecated since
2.6 and was removed in 3.0.

See:
http://www.python.org/dev/peps/pep-0290/#testing-dictionary-membership

Mostly scripted with
sed -i -e 's/if \(not \)\?\(.*\)\.has_key(\(.*\))/if \3 \1in \2/'
16 files changed:
catalyst
modules/catalyst/config.py
modules/catalyst_lock.py
modules/catalyst_support.py
modules/embedded_target.py
modules/generic_stage_target.py
modules/grp_target.py
modules/livecd_stage1_target.py
modules/livecd_stage2_target.py
modules/netboot2_target.py
modules/netboot_target.py
modules/snapshot_target.py
modules/stage1_target.py
modules/stage2_target.py
modules/stage3_target.py
modules/stage4_target.py