Changeset 45
- Timestamp:
- 04/11/13 17:05:59 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/bletchley/blobtools.py
r44 r45 36 36 fmt = "%%%.2x" 37 37 38 ret_val = b ''38 ret_val = bytearray(b'') 39 39 for c in binary: 40 40 if c not in b'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789': 41 ret_val += (fmt % c).encode('ascii')41 ret_val.extend((fmt % c).encode('ascii')) 42 42 elif plus and (c == 20): 43 ret_val += b'+'43 ret_val.extend(b'+') 44 44 else: 45 ret_val += c45 ret_val.append(c) 46 46 47 47 return ret_val
Note: See TracChangeset
for help on using the changeset viewer.