qubes_prefs.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # encoding=utf-8
  2. #
  3. # The Qubes OS Project, http://www.qubes-os.org
  4. #
  5. # Copyright (C) 2010-2015 Joanna Rutkowska <joanna@invisiblethingslab.com>
  6. # Copyright (C) 2015 Wojtek Porczyk <woju@invisiblethingslab.com>
  7. #
  8. # This program is free software; you can redistribute it and/or modify
  9. # it under the terms of the GNU Lesser General Public License as published by
  10. # the Free Software Foundation; either version 2.1 of the License, or
  11. # (at your option) any later version.
  12. #
  13. # This program is distributed in the hope that it will be useful,
  14. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. # GNU Lesser General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU Lesser General Public License along
  19. # with this program; if not, see <http://www.gnu.org/licenses/>.
  20. ''' Manipulate global properties.'''
  21. from __future__ import print_function
  22. import sys
  23. import qubesadmin
  24. import qubesadmin.tools.qvm_prefs
  25. def get_parser():
  26. '''Prepare argument parser'''
  27. return qubesadmin.tools.qvm_prefs.get_parser(None)
  28. def main(args=None, app=None): # pylint: disable=missing-docstring
  29. parser = get_parser()
  30. args = parser.parse_args(args, app=app)
  31. target = args.app
  32. return qubesadmin.tools.qvm_prefs.process_actions(parser, args, target)
  33. if __name__ == '__main__':
  34. sys.exit(main())