@@ -226,17 +226,14 @@ class BaseConfig(object):
self.guest_agent = False
self.guest_agent_sockpath = '/tmp/qga.sock'
- def acquire_taplock(self, error=True):
+ def acquire_taplock(self):
logger.debug("Acquiring lockfile %s..." % self.taplock)
try:
self.taplock_descriptor = open(self.taplock, 'w')
fcntl.flock(self.taplock_descriptor, fcntl.LOCK_EX|fcntl.LOCK_NB)
except Exception as e:
msg = "Acquiring lockfile %s failed: %s" % (self.taplock, e)
- if error:
- logger.error(msg)
- else:
- logger.info(msg)
+ logger.info(msg)
if self.taplock_descriptor:
self.taplock_descriptor.close()
self.taplock_descriptor = None
@@ -1179,7 +1176,7 @@ to your build configuration.
logger.info('Found %s.skip, skipping %s' % (lockfile, p))
continue
self.taplock = lockfile + '.lock'
- if self.acquire_taplock(error=False):
+ if self.acquire_taplock():
tap = p
logger.info("Using preconfigured tap device %s" % tap)
logger.info("If this is not intended, touch %s.skip to make runqemu skip %s." %(lockfile, tap))
the error handling should be done on the return code by the calling function, so creating an error within the function does not make that much sense. Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> --- scripts/runqemu | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)