File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818# You should have received a copy of the GNU Lesser General Public License along
1919# with this program; if not, see <http://www.gnu.org/licenses/>.
2020
21- ''' Immediately terminate a qube without a graceful shutdown sequence.'''
21+ """ Immediately terminate a qube without a graceful shutdown sequence."""
2222
2323
2424import asyncio
2828from qubesadmin .utils .kill import kill
2929
3030parser = QubesArgumentParser (
31- description = 'immediately terminate a qube without a graceful shutdown'
32- ' sequence' ,
33- vmname_nargs = '+' )
31+ description = "immediately terminate a qube without a graceful shutdown"
32+ " sequence" ,
33+ vmname_nargs = "+" ,
34+ )
3435
3536
3637async def run_async (args = None , app = None ):
@@ -49,5 +50,5 @@ def main(args=None, app=None):
4950 return asyncio .run (run_async (args = args , app = app ))
5051
5152
52- if __name__ == ' __main__' :
53+ if __name__ == " __main__" :
5354 sys .exit (main ())
Original file line number Diff line number Diff line change 1818# You should have received a copy of the GNU Lesser General Public License along
1919# with this program; if not, see <http://www.gnu.org/licenses/>.
2020
21- ''' qvm-pause - Pause a domain'''
21+ """ qvm-pause - Pause a domain"""
2222
2323import asyncio
2424import sys
2828from qubesadmin .utils .suspend import suspend
2929
3030
31- parser = QubesArgumentParser (vmname_nargs = '+' ,
32- description = 'pause a qube' ,
33- epilog = 'Paused qubes will be killed on system shutdown.' )
31+ parser = QubesArgumentParser (
32+ vmname_nargs = "+" ,
33+ description = "pause a qube" ,
34+ epilog = "Paused qubes will be killed on system shutdown." ,
35+ )
3436
3537parser .add_argument (
3638 "--suspend" ,
4143
4244
4345def main (args = None , app = None ):
44- ''' Main routine of :program:`qvm-pause`.
46+ """ Main routine of :program:`qvm-pause`.
4547
4648 :param list args: Optional arguments to override those delivered from \
4749 command line.
48- '''
50+ """
4951
5052 args = parser .parse_args (args , app = app )
5153 exit_code = 0
@@ -63,5 +65,5 @@ def main(args=None, app=None):
6365 return exit_code
6466
6567
66- if __name__ == ' __main__' :
68+ if __name__ == " __main__" :
6769 sys .exit (main ())
Original file line number Diff line number Diff line change 1818# You should have received a copy of the GNU Lesser General Public License along
1919# with this program; if not, see <http://www.gnu.org/licenses/>.
2020
21- ''' qvm-unpause - Unpause a domain'''
21+ """ qvm-unpause - Unpause a domain"""
2222
2323import asyncio
2424import sys
2727from qubesadmin .utils .unpause import unpause
2828
2929
30- parser = QubesArgumentParser (
31- vmname_nargs = '+' ,
32- description = 'unpause a domain' )
30+ parser = QubesArgumentParser (vmname_nargs = "+" , description = "unpause a domain" )
3331
3432
3533def main (args = None , app = None ):
36- ''' Main routine of :program:`qvm-unpause`.
34+ """ Main routine of :program:`qvm-unpause`.
3735
3836 :param list args: Optional arguments to override those delivered from \
3937 command line.
40- '''
38+ """
4139
4240 args = parser .parse_args (args , app = app )
4341 exit_code = 0
4442 domains = args .domains
4543 if args .all_domains :
46- domains = [
47- vm
48- for vm in domains
49- if not vm .features .get ("internal" )
50- ]
44+ domains = [vm for vm in domains if not vm .features .get ("internal" )]
5145
5246 failed = asyncio .run (unpause (domains = domains ))
5347 action = "unpause/resume"
@@ -59,5 +53,5 @@ def main(args=None, app=None):
5953 return exit_code
6054
6155
62- if __name__ == ' __main__' :
56+ if __name__ == " __main__" :
6357 sys .exit (main ())
You can’t perform that action at this time.
0 commit comments