Rev 161: I got a intermittent test failure, I'd like to avoid those in http://bazaar.launchpad.net/~meliae-dev/meliae/trunk

John Arbash Meinel john at arbash-meinel.com
Wed Jul 28 21:45:05 BST 2010


At http://bazaar.launchpad.net/~meliae-dev/meliae/trunk

------------------------------------------------------------
revno: 161
revision-id: john at arbash-meinel.com-20100728204449-gbwu4mjn72xcgw4d
parent: john at arbash-meinel.com-20100728203640-8ng11q4olwxl2gyh
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: trunk
timestamp: Wed 2010-07-28 15:44:49 -0500
message:
  I got a intermittent test failure, I'd like to avoid those
-------------- next part --------------
=== modified file 'meliae/files.py'
--- a/meliae/files.py	2009-09-18 17:00:34 +0000
+++ b/meliae/files.py	2010-07-28 20:44:49 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Canonical Ltd
+# Copyright (C) 2009, 2010 Canonical Ltd
 # 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License version 3 as
@@ -63,6 +63,12 @@
         process.stderr.close()
         terminate = getattr(process, 'terminate', None)
         # terminate is a py2.6 thing
+        # XXX: I've observed a test failure when the subprocess has already
+        #      finished and then we try to call terminate, which then raises an
+        #      exception (not-allowed error). We should probably use a wrapper.
+        #      Either call process.poll() first, or trap the terminate for
+        #      exceptions. The error might also be that the process didn't
+        #      actually spawn yet...
         if terminate is not None:
             return process.stdout, terminate
         else:



More information about the bazaar-commits mailing list