GitHub PullRequestReviewCommentEvent at 2014-01-21 07:04:08
Repository: buildbot
Actor: jaredgrubb
Payload: {"comment":{"url":"https://api.github.com/repos/buildbot/buildbot/pulls/comments/9028690","id":9028690,"diff_hunk":"@@ -875,6 +874,195 @@ def setStatus(self, cmd, results):\n         return defer.succeed(None)\n \n \n+class CommandMixin(object):\n+\n+    @defer.inlineCallbacks\n+    def _runRemoteCommand(self, cmd, abandonOnFailure, args):\n+        cmd = remotecommand.RemoteCommand(cmd, args)\n+        try:\n+            log = self.getLog('stdio')\n+        except:\n+            log = yield self.addLog('stdio')\n+        cmd.useLog(log, False)\n+        yield self.runCommand(cmd)\n+        if abandonOnFailure and cmd.didFail():\n+            raise BuildStepFailed()\n+        defer.returnValue(not cmd.didFail())\n+\n+    def runRmdir(self, dir, log=None, abandonOnFailure=True):\n+        return self._runRemoteCommand('rmdir', abandonOnFailure,\n+                                      {'dir': dir, 'logEnviron': False})\n+\n+    def pathExists(self, path, log=None):\n+        return self._runRemoteCommand('stat', False,\n+                                      {'file': path, 'logEnviron': False})\n+\n+    def runMkdir(self, dir, log=None, abandonOnFailure=True):\n+        return self._runRemoteCommand('mkdir', abandonOnFailure,\n+                                      {'dir': dir, 'logEnviron': False})\n+\n+\n+class ShellMixin(object):\n+\n+    command = None\n+    workdir = None\n+    env = {}\n+    want_stdout = True\n+    want_stderr = True\n+    usePTY = 'slave-config'\n+    logfiles = {}\n+    lazylogfiles = {}\n+    timeout = 1200\n+    maxTime = None\n+    logEnviron = True\n+    interruptSignal = 'KILL'\n+    sigtermTime = None\n+    initialStdin = None\n+    decodeRC = {0: SUCCESS}\n+\n+    _shellMixinArgs = [\n+        'command',\n+        'workdir',\n+        'env',\n+        'want_stdout',\n+        'want_stderr',\n+        'usePTY',\n+        'logfiles',\n+        'lazylogfiles',\n+        'timeout',\n+        'maxTime',\n+        'logEnviron',\n+        'interruptSignal',\n+        'sigtermTime',\n+        'initialStdin',\n+        'decodeRC',\n+    ]\n+    renderables = _shellMixinArgs\n+\n+    def setupShellMixin(self, constructorArgs, prohibitArgs=[]):","path":"master/buildbot/process/buildstep.py","position":173,"original_position":173,"commit_id":"9d96a068e142dccb9633db18f52eddf700bad04b","original_commit_id":"9d96a068e142dccb9633db18f52eddf700bad04b","user":{"login":"jaredgrubb","id":1256381,"avatar_url":"https://gravatar.com/avatar/f3fbe05e600bced1a176a1ecade65070?d=https%3A%2F%2Fidenticons.github.com%2Fac8de55de2ca639530f5f5db3d1428ce.png&r=x","gravatar_id":"f3fbe05e600bced1a176a1ecade65070","url":"https://api.github.com/users/jaredgrubb","html_url":"https://github.com/jaredgrubb","followers_url":"https://api.github.com/users/jaredgrubb/followers","following_url":"https://api.github.com/users/jaredgrubb/following{/other_user}","gists_url":"https://api.github.com/users/jaredgrubb/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredgrubb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredgrubb/subscriptions","organizations_url":"https://api.github.com/users/jaredgrubb/orgs","repos_url":"https://api.github.com/users/jaredgrubb/repos","events_url":"https://api.github.com/users/jaredgrubb/events{/privacy}","received_events_url":"https://api.github.com/users/jaredgrubb/received_events","type":"User","site_admin":false},"body":"Why is this not called __init__? For example, ShellSequence has two base classes, but invokes __init__ on one, but setupShellMixin on this one. ","created_at":"2014-01-21T07:04:08Z","updated_at":"2014-01-21T07:04:08Z","html_url":"https://github.com/buildbot/buildbot/pull/1055#discussion_r9028690","pull_request_url":"https://api.github.com/repos/buildbot/buildbot/pulls/1055","_links":{"self":{"href":"https://api.github.com/repos/buildbot/buildbot/pulls/comments/9028690"},"html":{"href":"https://github.com/buildbot/buildbot/pull/1055#discussion_r9028690"},"pull_request":{"href":"https://api.github.com/repos/buildbot/buildbot/pulls/1055"}}}}