• Kirill Smelkov's avatar
    *: s.decode('hex') -> fromhex(s) · b508f108
    Kirill Smelkov authored
    Because on Py3:
    
            def test_dumpreader():
                in_ = b"""\
            txn 0123456789abcdef " "
            user "my name"
            description "o la-la..."
            extension "zzz123 def"
            obj 0000000000000001 delete
            obj 0000000000000002 from 0123456789abcdee
            obj 0000000000000003 54 adler32:01234567 -
            obj 0000000000000004 4 sha1:9865d483bc5a94f2e30056fc256ed3066af54d04
            ZZZZ
            obj 0000000000000005 9 crc32:52fdeac5
            ABC
    
            DEF!
    
            txn 0123456789abcdf0 " "
            user "author2"
            description "zzz"
            extension "qqq"
    
            """
    
                r = DumpReader(BytesIO(in_))
                t1 = r.readtxn()
                assert isinstance(t1, Transaction)
        >       assert t1.tid == '0123456789abcdef'.decode('hex')
        E       AttributeError: 'str' object has no attribute 'decode'
    
        test/test_dump.py:77: AttributeError
    
    Based on patch by Jérome Perrin.
    b508f108
Name
Last commit
Last update
..
test Loading commit data...
__init__.py Loading commit data...
help.py Loading commit data...
util.py Loading commit data...
zodb.py Loading commit data...
zodbanalyze.py Loading commit data...
zodbcmp.py Loading commit data...
zodbcommit.py Loading commit data...
zodbdump.py Loading commit data...
zodbinfo.py Loading commit data...