comparison bin/treepkgbuilder.py @ 184:83c77307ffb1

Add the addkey command to bin/treepkgbuilder.py and a corresponding method to the PBuilder class.
author Bernhard Herzog <bh@intevation.de>
date Wed, 25 Jun 2008 15:15:30 +0000
parents df7498d0bd9d
children eaadf5350a1a
comparison
equal deleted inserted replaced
183:72e41b27f224 184:83c77307ffb1
88 def run(self): 88 def run(self):
89 builder = self.get_builder() 89 builder = self.get_builder()
90 builder.update(suppress_output=False, log_info=False) 90 builder.update(suppress_output=False, log_info=False)
91 91
92 92
93 class AddKeyCommand(Command):
94
95 names = ("addkey", "add-key")
96
97 def __init__(self, arguments):
98 super(AddKeyCommand, self).__init__(arguments)
99 if not self.opts.key_id:
100 print >>sys.stderr, "No key id given"
101 sys.exit(1)
102
103 def create_parser(self):
104 parser = super(AddKeyCommand, self).create_parser()
105 parser.add_option("--key-id",
106 help=("The id of the key to add. Required."))
107 return parser
108
109 def run(self):
110 builder = self.get_builder()
111 builder.add_apt_key(self.opts.key_id)
112
113
93 class HelpCommand(Command): 114 class HelpCommand(Command):
94 115
95 names = ("help", "--help", "-h") 116 names = ("help", "--help", "-h")
96 117
97 def run(self): 118 def run(self):
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)