fix custom module (bug #116024)
authorMarius Mauch <genone@gentoo.org>
Mon, 19 Dec 2005 17:39:13 +0000 (17:39 -0000)
committerMarius Mauch <genone@gentoo.org>
Mon, 19 Dec 2005 17:39:13 +0000 (17:39 -0000)
svn path=/main/trunk/; revision=2408

pym/elog_modules/mod_custom.py
pym/elog_modules/mod_save.py

index eebbdd55b2d43aaea6b144f01de766a8c5aa495f..d609e79ba6aeae45589bae06e15e2d6e5ef3bbbe 100644 (file)
@@ -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)
index 970c526f4496e9c5cdb031e62a4180daf392499e..106e8800a7e107095bd832cdbd8cdcd167ceae78 100644 (file)
@@ -15,4 +15,4 @@ def process(mysettings, cpv, logentries, fulltext):
        elogfile.write(fulltext)
        elogfile.close()
 
-       return
+       return elogfilename