summaryrefslogtreecommitdiffstats
path: root/pym/elog_modules
diff options
context:
space:
mode:
Diffstat (limited to 'pym/elog_modules')
-rw-r--r--pym/elog_modules/mod_custom.py3
-rw-r--r--pym/elog_modules/mod_echo.py2
-rw-r--r--pym/elog_modules/mod_mail_summary.py2
3 files changed, 3 insertions, 4 deletions
diff --git a/pym/elog_modules/mod_custom.py b/pym/elog_modules/mod_custom.py
index d609e79ba..90b974f67 100644
--- a/pym/elog_modules/mod_custom.py
+++ b/pym/elog_modules/mod_custom.py
@@ -3,8 +3,7 @@ import elog_modules.mod_save, portage_exec, portage_exception
def process(mysettings, cpv, logentries, fulltext):
elogfilename = elog_modules.mod_save.process(mysettings, cpv, logentries, fulltext)
- if (not "PORTAGE_ELOG_COMMAND" in mysettings.keys()) \
- or len(mysettings["PORTAGE_ELOG_COMMAND"]) == 0:
+ if not mysettings.get("PORTAGE_ELOG_COMMAND"):
raise portage_exception.MissingParameter("!!! Custom logging requested but PORTAGE_ELOG_COMMAND is not defined")
else:
mylogcmd = mysettings["PORTAGE_ELOG_COMMAND"]
diff --git a/pym/elog_modules/mod_echo.py b/pym/elog_modules/mod_echo.py
index a120d17c9..55d33bb1f 100644
--- a/pym/elog_modules/mod_echo.py
+++ b/pym/elog_modules/mod_echo.py
@@ -12,7 +12,7 @@ def process(mysettings, key, logentries, fulltext):
def finalize(mysettings):
printer = EOutput()
- for key in _items.keys():
+ for key in _items:
print
printer.einfo("Messages for package %s:" % key)
print
diff --git a/pym/elog_modules/mod_mail_summary.py b/pym/elog_modules/mod_mail_summary.py
index 5e642f418..783d73196 100644
--- a/pym/elog_modules/mod_mail_summary.py
+++ b/pym/elog_modules/mod_mail_summary.py
@@ -31,7 +31,7 @@ def finalize(mysettings):
mybody = "elog messages for the following packages generated by " + \
"process %d on host %s:\n" % (os.getpid(), socket.getfqdn())
- for cpv in _items.keys():
+ for cpv in _items:
mybody += "- %s\n" % cpv
mymessage = portage_mail.create_message(myfrom, myrecipient, mysubject, mybody, attachments=_items.values())