Skip to content

Instantly share code, notes, and snippets.

@goertzenator
Created February 3, 2015 16:54
Show Gist options
  • Save goertzenator/39fecd3222c118aade7a to your computer and use it in GitHub Desktop.
Save goertzenator/39fecd3222c118aade7a to your computer and use it in GitHub Desktop.
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