From 5115eef41311e4c93cec9bd8c39d4c1697c39172 Mon Sep 17 00:00:00 2001 From: Bahtiar `kalkin-` Gadimov Date: Wed, 13 Jul 2016 18:08:41 +0200 Subject: [PATCH] =?UTF-8?q?qvm-shutdown=20make=20pylint=20happy=20?= =?UTF-8?q?=E2=99=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- qubes/tools/qvm_shutdown.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/qubes/tools/qvm_shutdown.py b/qubes/tools/qvm_shutdown.py index 2d424b55..6b82cfd1 100644 --- a/qubes/tools/qvm_shutdown.py +++ b/qubes/tools/qvm_shutdown.py @@ -23,6 +23,8 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # +''' Shutdown a qube ''' + from __future__ import print_function import sys @@ -32,7 +34,7 @@ import qubes.config import qubes.tools parser = qubes.tools.QubesArgumentParser( - description='gracefully shut down a qube', vmname_nargs='+') + description=__doc__, vmname_nargs='+') parser.add_argument('--force', action='store_true', default=False, @@ -50,10 +52,12 @@ parser.add_argument('--timeout', ' (default: %d)') -def main(args=None): +def main(args=None): # pylint: disable=missing-docstring args = parser.parse_args(args) - [vm.shutdown(force=args.force) for vm in args.domains if not vm.is_halted()] + for vm in args.domains: + if not vm.is_halted(): + vm.shutdown(force=args.force) if not args.wait: return