From: Marius Mauch Date: Mon, 19 Dec 2005 17:39:13 +0000 (-0000) Subject: fix custom module (bug #116024) X-Git-Tag: v2.1_pre2~32 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8a3d0341eb100e4e560b7554c4eef83724cc45df;p=portage.git fix custom module (bug #116024) svn path=/main/trunk/; revision=2408 --- diff --git a/pym/elog_modules/mod_custom.py b/pym/elog_modules/mod_custom.py index eebbdd55b..d609e79ba 100644 --- a/pym/elog_modules/mod_custom.py +++ b/pym/elog_modules/mod_custom.py @@ -1,15 +1,15 @@ import elog_modules.mod_save, portage_exec, portage_exception def process(mysettings, cpv, logentries, fulltext): - elog_modules.mod_save.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: raise portage_exception.MissingParameter("!!! Custom logging requested but PORTAGE_ELOG_COMMAND is not defined") else: mylogcmd = mysettings["PORTAGE_ELOG_COMMAND"] - mylogcmd.replace("${LOGFILE}", elogfilename) - mylogcmd.replace("${PACKAGE}", cpv) + mylogcmd = mylogcmd.replace("${LOGFILE}", elogfilename) + mylogcmd = mylogcmd.replace("${PACKAGE}", cpv) retval = portage_exec.spawn_bash(mylogcmd) if retval != 0: raise portage_exception.PortageException("!!! PORTAGE_ELOG_COMMAND failed with exitcode %d" % retval) diff --git a/pym/elog_modules/mod_save.py b/pym/elog_modules/mod_save.py index 970c526f4..106e8800a 100644 --- a/pym/elog_modules/mod_save.py +++ b/pym/elog_modules/mod_save.py @@ -15,4 +15,4 @@ def process(mysettings, cpv, logentries, fulltext): elogfile.write(fulltext) elogfile.close() - return + return elogfilename