peer get automatically stopped
authorMatthias Wachs <wachs@net.in.tum.de>
Thu, 15 Dec 2011 14:21:40 +0000 (14:21 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Thu, 15 Dec 2011 14:21:40 +0000 (14:21 +0000)
src/integration-tests/gnunet_testing.py.in

index 18fc7a2492f2f50011ab8c05892a44ca96dfd831..404d5db4e775499650bd7218a48fafb8af031e6f 100644 (file)
@@ -56,6 +56,12 @@ class Peer:
         self.test = test
         self.started = False
         self.cfg = cfg_file 
+    def __del__(self):
+       if (self.started == True):
+               print 'ERROR! Peer using cfg ' + self.cfg + ' was not stopped'
+               self.started == False
+               if (False == self.stop ()):
+                       print 'ERROR! Peer using cfg ' + self.cfg + ' could not be stopped'
     def start (self):
         self.test.p ("Starting peer using cfg " + self.cfg)
         try: