def _work_request(self, worker, md5=None):
        """Wrapper for a work_request to workbench"""

        # I'm sure there's a better way to do this
        if not md5 and not self.session.md5:
            return 'Must call worker with an md5 argument...'
        elif not md5:
            md5 = self.session.md5

        # Is the md5 a sample_set?
        if self.workbench.is_sample_set(md5):
            return self.workbench.set_work_request(worker, md5)

        # Make the work_request with worker and md5 args
        try:
            return self.workbench.work_request(worker, md5)
        except zerorpc.exceptions.RemoteError as e:
            return repr_to_str_decorator.r_to_s(self._data_not_found)(e)
def _work_request ( self , worker , md5 = None ) : if not md5 and not self . session . md5 : return 'Must call worker with an md5 argument...' elif not md5 : md5 = self . session . md5 if self . workbench . is_sample_set ( md5 ) : return self . workbench . set_work_request ( worker , md5 ) try : return self . workbench . work_request ( worker , md5 ) except zerorpc . exceptions . RemoteError as e : return repr_to_str_decorator . r_to_s ( self . _data_not_found ) ( e )
Wrapper for a work_request to workbench