Skip to content

Commit

Permalink
virt: don't show failures when backend is being terminated
Browse files Browse the repository at this point in the history
  • Loading branch information
Radek Novacek committed Jul 26, 2016
1 parent d317270 commit 38a96bc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions virtwho/virt/virt.py
Expand Up @@ -370,11 +370,13 @@ def run(self):
try:
self._run()
except VirtError as e:
self.logger.error("Virt backend '%s' fails with error: %s", self.config.name, str(e))
has_error = True
if not self.is_terminated():
self.logger.error("Virt backend '%s' fails with error: %s", self.config.name, str(e))
has_error = True
except Exception:
self.logger.exception("Virt backend '%s' fails with exception:", self.config.name)
has_error = True
if not self.is_terminated():
self.logger.exception("Virt backend '%s' fails with exception:", self.config.name)
has_error = True

if self._oneshot:
if has_error:
Expand Down

0 comments on commit 38a96bc

Please sign in to comment.