diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-07-01 12:53:07 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-07-01 12:53:07 +0000 |
commit | 56aea2672000174743514bcc7f58f41733f64ce4 (patch) | |
tree | c6d9cb04d5b2d50eb0670354a42123ac4e78c44c /bin/dispatch-conf | |
parent | a4c79bdfd0b8e5a58ce1bfd181a41a8625370b73 (diff) | |
download | portage-56aea2672000174743514bcc7f58f41733f64ce4.tar.gz portage-56aea2672000174743514bcc7f58f41733f64ce4.tar.bz2 portage-56aea2672000174743514bcc7f58f41733f64ce4.zip |
Py3k compatibility patch #5 by Ali Polatel <hawking@g.o>.
Replace dict.has_key() calls with "in" and "not in" operators.
svn path=/main/trunk/; revision=10874
Diffstat (limited to 'bin/dispatch-conf')
-rwxr-xr-x | bin/dispatch-conf | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/dispatch-conf b/bin/dispatch-conf index 8ae055565..07131b55e 100755 --- a/bin/dispatch-conf +++ b/bin/dispatch-conf @@ -72,7 +72,7 @@ class dispatch: self.options = portage.dispatch_conf.read_config(MANDATORY_OPTS) - if self.options.has_key("log-file"): + if "log-file" in self.options: if os.path.isfile(self.options["log-file"]): shutil.copy(self.options["log-file"], self.options["log-file"] + '.old') if os.path.isfile(self.options["log-file"]) \ @@ -270,7 +270,7 @@ class dispatch: show_new_diff = 1 continue elif c == 'e': - if not os.environ.has_key('EDITOR'): + if 'EDITOR' not in os.environ: os.environ['EDITOR']='nano' os.system(os.environ['EDITOR'] + ' ' + newconf) continue @@ -334,7 +334,7 @@ class dispatch: conf = re.sub (r'\._cfg\d+_', '', nconf) dir = re.match (r'^(.+)/', nconf).group (1) - if h.has_key (conf): + if conf in h: mrgconf = re.sub(r'\._cfg', '._mrg', h[conf]['new']) if os.path.exists(mrgconf): os.unlink(mrgconf) |