~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/util/bencode.py

  • Committer: John Ferlito
  • Date: 2009-05-25 10:59:42 UTC
  • mto: (4665.4.1 ppa-doc)
  • mto: This revision was merged to the branch mainline in revision 4693.
  • Revision ID: johnf@inodes.org-20090525105942-5xkcbe37m1u5lp5z
Update packaging scripts to make deployment a bit easier
Update documentation for deploying to PPA

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
        return (r, f + 1)
87
87
 
88
88
    def bdecode(self, x):
89
 
        if type(x) != str:
90
 
            raise TypeError
91
89
        try:
92
90
            r, l = self.decode_func[x[0]](x, 0)
93
91
        except (IndexError, KeyError):
154
152
        encode_int(int(x), r)
155
153
    encode_func[BooleanType] = encode_bool
156
154
 
157
 
from bzrlib._static_tuple_py import StaticTuple
158
 
encode_func[StaticTuple] = encode_list
159
 
try:
160
 
    from bzrlib._static_tuple_c import StaticTuple
161
 
except ImportError:
162
 
    pass
163
 
else:
164
 
    encode_func[StaticTuple] = encode_list
165
 
 
166
155
 
167
156
def bencode(x):
168
157
    r = []