[patch] Patch to fix double call to "mock clean" in case, if mock will failed on "prep" stage.

Alexandr Kanevskiy kad at crystalowl.net
Mon Oct 31 18:58:59 UTC 2005


В Пнд, 31/10/2005 в 12:02 -0500, Dan Williams пишет:
> On Sun, 2005-10-30 at 21:26 +0200, Alexandr Kanevskiy wrote:
> > Attached patch solves that.
> 
> Good catch.  Thanks!  It's been committed to HEAD and STABLE_4.
Welcome ;)

Another findings from today looking at code: 
You have work_dir declared in global scope (line 847)
and use it from get_url_for_file(), line 62. 
In that function will be redefining of global variable. 
But expected to be local variable assignment.
Maybe rewrite that function to use _work_dir instead work_dir ?

The same thing is for 'hostname', 'cfg','port' in get_url_for_file()...

or maybe it will be better that global scope code as 
def main():
     .....

and put at bottom:

if __name__ == '__main__':
	main()
?


More funny things with work_dir, are in BuilderMock.__init__(), line
102, and in BuilderMock.run(), line 438. 

I think, for BuilderMock class, all references to work_dir better to be
rewritten as "self._work_dir" ? 

And few more findings in import section:

import time - listed twice.
SimpleXMLRPCServer, xmlrpclib imported, but not used.

-- 
Alexandr Kanevskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/fedora-buildsys-list/attachments/20051031/52ae4ddc/attachment.sig>


More information about the Fedora-buildsys-list mailing list