dgquintas / BoincVM

No description has been added.

Clone this repository (size: 1.2 MB): HTTPS / SSH
$ hg clone http://bitbucket.org/dgquintas/boincvm/
commit 148: 2a1b6c8ca48b
parent 147: 1e67cd667c53
parent 145: 5d2f5c6dc8fc
branch: default
merge
dgquintas
7 months ago

Changed (Δ325 bytes):

Up to file-list BoincVMController/controllers/VirtualBoxController.py:

@@ -119,8 +119,9 @@ class VirtualBoxController(object):
119
119
        vrdpServer.port = vrdpPort
120
120
        cls.logger.debug("VRDP port set to %d for VM %s" % (vrdpPort, mutableM.getName()))
121
121
        mutableM.saveSettings()
122
      except:
123
        pass #XXX: add logging
122
# commented out, as Python 2.4 doesn't support this syntax
123
#      except:
124
#        pass #XXX: add logging
124
125
      finally:
125
126
        if session.state == SessionState.Open:
126
127
          session.close()
@@ -366,11 +367,19 @@ class VirtualBoxController(object):
366
367
        m.deleteSettings()
367
368
        msg = "Rolled back creation of VM '%s'" % m.name
368
369
        cls.logger.debug(msg)
369
        raise e
370
      finally:
370
 
371
        #the following two lines should go in a finally:,
372
        #but that's not supported by python 2.4
371
373
        if session.state == SessionState.Open:
372
374
          session.close()
373
375
376
        raise
377
378
      #the following two lines should go in a finally:,
379
      #but that's not supported by python 2.4
380
      if session.state == SessionState.Open:
381
        session.close()
382
374
383
      return True
375
384
376
385
    cls.logger.debug("Controller method %s invoked" % support.discoverCaller() )