~alo21/pyjuju/fix-lp956000

« back to all changes in this revision

Viewing changes to juju/hooks/commands.py

  • Committer: Benjamin Saller
  • Date: 2012-05-03 17:20:38 UTC
  • mfrom: (532.1.5 log-output)
  • Revision ID: bcsaller@gmail.com-20120503172038-7v7w7y0f0pgv2yh2
Merge juju-log output fix [r=hazmat] [f=915506]

juju-log in hooks uses the logging channels for IO and the command shouldn't output directly to stdout except in case of errors doing proper logging

Show diffs side-by-side

added added

removed removed

Lines of Context:
137
137
 
138
138
    def run(self):
139
139
        return self.client.list_relations(self.options.client_id,
140
 
                                          self.options.relation_id)
 
140
                                   self.options.relation_id)
141
141
 
142
142
    def format_eval(self, result, stream):
143
143
        """ eval `juju-list` """
169
169
        return self.client.log(self.options.l,
170
170
                               self.options.message)
171
171
 
 
172
    def render(self, result):
 
173
        return None
 
174
 
172
175
 
173
176
def log():
174
177
    """Entry point for juju-log."""