diff options
-rwxr-xr-x | scripts/runqemu | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index 6fae3d8c5d..9d6a2e86d4 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
@@ -235,7 +235,7 @@ class BaseConfig(object): | |||
235 | else: | 235 | else: |
236 | return False | 236 | return False |
237 | 237 | ||
238 | def acquire_portlock(self, lockfile, error=True): | 238 | def acquire_portlock(self, lockfile): |
239 | logger.debug("Acquiring lockfile %s..." % lockfile) | 239 | logger.debug("Acquiring lockfile %s..." % lockfile) |
240 | try: | 240 | try: |
241 | portlock_descriptor = open(lockfile, 'w') | 241 | portlock_descriptor = open(lockfile, 'w') |
@@ -243,11 +243,8 @@ class BaseConfig(object): | |||
243 | fcntl.flock(self.portlocks[lockfile], fcntl.LOCK_EX|fcntl.LOCK_NB) | 243 | fcntl.flock(self.portlocks[lockfile], fcntl.LOCK_EX|fcntl.LOCK_NB) |
244 | except Exception as e: | 244 | except Exception as e: |
245 | msg = "Acquiring lockfile %s failed: %s" % (lockfile, e) | 245 | msg = "Acquiring lockfile %s failed: %s" % (lockfile, e) |
246 | if error: | 246 | logger.info(msg) |
247 | logger.error(msg) | 247 | if lockfile in self.portlocks.keys() and self.portlocks[lockfile]: |
248 | else: | ||
249 | logger.info(msg) | ||
250 | if self.portlocks[lockfile]: | ||
251 | self.portlocks[lockfile].close() | 248 | self.portlocks[lockfile].close() |
252 | del self.portlocks[lockfile] | 249 | del self.portlocks[lockfile] |
253 | return False | 250 | return False |