Traceback after package build

Jeff Pitman symbiont at berlios.de
Tue Aug 23 08:58:07 UTC 2005


On Tuesday 23 August 2005 16:44, Warren Togami wrote:
> UnboundLocalError: local variable 'retval' referenced before
> assignment Cleaning up the buildroot...
>     /usr/bin/setarch ppc32 /usr/bin/mock clean

Somehow       if os.WIFEXITED(status):  resulted in FALSE.  So, retval 
was never assigned.  Currently, the do() function does not pre-init 
retval prior to the "if" with a default value.  

Something like this is needed:

    def do(self, command):
        """execute given command outside of chroot"""

        self.debug("Executing %s" % command)
        (status, output) = commands.getstatusoutput(command)

	retval = 0

        if os.WIFEXITED(status):
            retval = os.WEXITSTATUS(status)

        return (retval, output)




-- 
-jeff




More information about the Fedora-buildsys-list mailing list