summaryrefslogtreecommitdiffstats
path: root/bin/dispatch-conf
diff options
context:
space:
mode:
Diffstat (limited to 'bin/dispatch-conf')
-rwxr-xr-xbin/dispatch-conf6
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)