diff --git a/pepper/libpepper.py b/pepper/libpepper.py index dbab2e5..7de015d 100644 --- a/pepper/libpepper.py +++ b/pepper/libpepper.py @@ -203,14 +203,26 @@ def lookup_jid(self, jid): ''' Get job results - Wraps :meth:`low`. + Wraps :meth:`runner`. + ''' + + return self.runner('jobs.lookup_jid', jid='{0}'.format(jid)) + + + def runner(self, fun, **kwargs): + ''' + Run a single command using the ``runner`` client + + Usage:: + runner('jobs.lookup_jid', jid=12345) ''' low = { 'client': 'runner', - 'fun': 'jobs.lookup_jid', - 'jid': jid + 'fun': fun, } + low.update(kwargs) + return self.low([low], path='/') def login(self, username, password, eauth):