Created
December 15, 2015 11:30
-
-
Save adiroiban/adea8a520358c6a71be5 to your computer and use it in GitHub Desktop.
obfuscation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Backslash-escape errorCode. Python 3.5 can do this natively | |
# ("backslashescape") but Python 2.7 and Python 3.4 can't. | |
if _PY3: | |
errorCodeForMessage = "".join( | |
"\\x%2x" % c if c >= 0x80 else chr(c) | |
for c in errorCode) | |
else: | |
errorCodeForMessage = "".join( | |
"\\x%2x" % ord(c) if ord(c) >= 0x80 else c | |
for c in errorCode) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment