[Piuparts-commits] [SCM] piuparts git repository branch, piatti, updated. 0.45-75-g5fca52d

Andreas Beckmann debian at abeckmann.de
Thu Jul 26 12:13:31 UTC 2012


The following commit has been merged in the piatti branch:
commit 27b774a3d9aef11c75ec4ddf860a20af9d52bc80
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Tue Jun 26 01:53:20 2012 +0200

    p-s: gracefully handle Slave.close() if not connected
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/piuparts-slave.py b/piuparts-slave.py
index a4ae001..5a2e7a7 100644
--- a/piuparts-slave.py
+++ b/piuparts-slave.py
@@ -189,8 +189,10 @@ class Slave:
 
     def close(self):
         logging.debug("Closing connection to master")
-        self._from_master.close()
-        self._to_master.close()
+        if self._from_master is not None:
+            self._from_master.close()
+        if self._to_master is not None:
+            self._to_master.close()
         self._from_master = self._to_master = None
         logging.info("Connection to master closed")
 

-- 
piuparts git repository



More information about the Piuparts-commits mailing list