Package zeroinstall :: Package cmd :: Module destroy
[frames] | no frames]

Source Code for Module zeroinstall.cmd.destroy

 1  """ 
 2  The B{0install destroy} command-line interface. 
 3  """ 
 4   
 5  # Copyright (C) 2012, Thomas Leonard 
 6  # See the README file for details, or visit http://0install.net. 
 7   
 8  from zeroinstall.cmd import UsageError 
 9   
10  syntax = "PET-NAME" 
11   
12 -def add_options(parser):
13 pass
14
15 -def handle(config, options, args):
16 """@type args: [str]""" 17 if len(args) != 1: 18 raise UsageError() 19 20 pet_name = args[0] 21 22 app = config.app_mgr.lookup_app(pet_name) 23 app.destroy()
24
25 -def complete(completion, args, cword):
26 """@type completion: L{zeroinstall.cmd._Completion} 27 @type args: [str] 28 @type cword: int""" 29 if len(args) != 1: return 30 completion.expand_apps()
31