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

Side by Side Diff: third_party/google-endpoints/setuptools/py27compat.py

Issue 2666783008: Add google-endpoints to third_party/. (Closed)
Patch Set: Created 3 years, 10 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
OLDNEW
(Empty)
1 """
2 Compatibility Support for Python 2.7 and earlier
3 """
4
5 import sys
6 import platform
7
8
9 def get_all_headers(message, key):
10 """
11 Given an HTTPMessage, return all headers matching a given key.
12 """
13 return message.get_all(key)
14
15
16 if sys.version_info < (3,):
17
18 def get_all_headers(message, key):
19 return message.getheaders(key)
20
21
22 linux_py2_ascii = (
23 platform.system() == 'Linux' and
24 sys.getfilesystemencoding() == 'ascii' and
25 sys.version_info < (3,)
26 )
27
28 rmtree_safe = str if linux_py2_ascii else lambda x: x
29 """Workaround for http://bugs.python.org/issue24672"""
OLDNEW
« no previous file with comments | « third_party/google-endpoints/setuptools/py26compat.py ('k') | third_party/google-endpoints/setuptools/py31compat.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698