Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Side by Side Diff: third_party/requests/packages/charade/chardistribution.py

Issue 25004007: Update 'requests' lib to v2.0. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/swarm_client
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 ######################## BEGIN LICENSE BLOCK ######################## 1 ######################## BEGIN LICENSE BLOCK ########################
2 # The Original Code is Mozilla Communicator client code. 2 # The Original Code is Mozilla Communicator client code.
3 # 3 #
4 # The Initial Developer of the Original Code is 4 # The Initial Developer of the Original Code is
5 # Netscape Communications Corporation. 5 # Netscape Communications Corporation.
6 # Portions created by the Initial Developer are Copyright (C) 1998 6 # Portions created by the Initial Developer are Copyright (C) 1998
7 # the Initial Developer. All Rights Reserved. 7 # the Initial Developer. All Rights Reserved.
8 # 8 #
9 # Contributor(s): 9 # Contributor(s):
10 # Mark Pilgrim - port to Python 10 # Mark Pilgrim - port to Python
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 def get_order(self, aBuf): 222 def get_order(self, aBuf):
223 # for euc-JP encoding, we are interested 223 # for euc-JP encoding, we are interested
224 # first byte range: 0xa0 -- 0xfe 224 # first byte range: 0xa0 -- 0xfe
225 # second byte range: 0xa1 -- 0xfe 225 # second byte range: 0xa1 -- 0xfe
226 # no validation needed here. State machine has done that 226 # no validation needed here. State machine has done that
227 char = wrap_ord(aBuf[0]) 227 char = wrap_ord(aBuf[0])
228 if char >= 0xA0: 228 if char >= 0xA0:
229 return 94 * (char - 0xA1) + wrap_ord(aBuf[1]) - 0xa1 229 return 94 * (char - 0xA1) + wrap_ord(aBuf[1]) - 0xa1
230 else: 230 else:
231 return -1 231 return -1
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698