Skip to content
This repository was archived by the owner on Jul 23, 2020. It is now read-only.
This repository was archived by the owner on Jul 23, 2020. It is now read-only.

pyssdb line 112 #30

@7134g

Description

@7134g

I took a close look at your code.
I have a question why line 112 does not directly decode('utf-8')

        while True:
            line = self._fp.readline().rstrip(utf8('\n'))
            if not line:
                break
            data = self._fp.read(int(line))
            self._fp.read(1)  # discard '\n'
            ret.append(data)

        status, ret = ret[0], ret[1:]
        st = status.decode('utf8')

Changed to:

        while True:
            line = self._fp.readline().rstrip(utf8('\n'))
            if not line:
                break
            data = self._fp.read(int(line))
            self._fp.read(1)  # discard '\n'
            ret.append(data.decode('utf8')) # modify

        status, ret = ret[0], ret[1:]
        st = status # modify

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions