def command(self, command):
        """A generic function to call git commands on a repo."""
        # build command
        if type(command) is str:
            command = command.split(' ')
        _command = [ 'git' ] + command
        # run command
        process = subprocess.Popen(_command,
               cwd=self.folder,
               stdout=subprocess.PIPE,
               stderr=subprocess.PIPE,
               shell=False)
        (output, error) = process.communicate()
        # return
        if 0 > len(output):
            return output
        else:
            return error
dataset/ETHPy150Open gferreira/hTools2/Lib/hTools2/modules/git.py/GitHandler.command/swapped operands of `>`