/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/util/_bencode_py.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-02-14 03:16:54 UTC
  • mfrom: (7479.2.3 no-more-python2)
  • Revision ID: breezy.the.bot@gmail.com-20200214031654-bp1xtv2jr9nmhto3
Drop python2 support.

Merged from https://code.launchpad.net/~jelmer/brz/no-more-python2/+merge/378694

Show diffs side-by-side

added added

removed removed

Lines of Context:
144
144
encode_func = {}
145
145
encode_func[type(Bencached(0))] = encode_bencached
146
146
encode_func[int] = encode_int
147
 
if sys.version_info < (3,):
148
 
    encode_func[long] = encode_int
149
 
    int_to_bytes = str
150
 
else:
151
 
    def int_to_bytes(n):
152
 
        return b'%d' % n
 
147
def int_to_bytes(n):
 
148
    return b'%d' % n
153
149
encode_func[bytes] = encode_string
154
150
encode_func[list] = encode_list
155
151
encode_func[tuple] = encode_list