Finish refactoring out py3compat and delete the file
[pyelftools.git] / elftools / common / utils.py
index 2355ed485895d6e0403c6e53c4155826af683ae7..b4bc1e73a1651bcaaab84691b99ba76113292d48 100644 (file)
@@ -19,6 +19,9 @@ def merge_dicts(*dicts):
         result.update(d)
     return result
 
+def bytes2str(b):
+    """Decode a bytes object into a string."""
+    return b.decode('latin-1')
 
 def bytelist2string(bytelist):
     """ Convert a list of byte values (e.g. [0x10 0x20 0x00]) to a bytes object