Created
February 3, 2015 16:54
-
-
Save goertzenator/39fecd3222c118aade7a to your computer and use it in GitHub Desktop.
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
def decode_bytes(bin): | |
try: | |
bcr_table = pickle.loads(bin) | |
except (ValueError, EOFError): | |
bcr_table = etf.binary_to_term(bin) | |
return bcr_table |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment