def decode(self, stream, encoding, fallback=None):
        if not hasattr(stream, 'decode'):
            return stream

        try:
            return stream.decode(encoding)
        except UnicodeDecodeError:
            if fallback:
                for enc in fallback:
                    try:
                        return stream.decode(enc)
                    except __HOLE__:
                        pass
            raise

    # sync commands
dataset/ETHPy150Open SublimeGit/SublimeGit/sgit/cmd.py/Cmd.decode