diff options
author | Treeki <treeki@gmail.com> | 2011-11-09 04:24:46 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2011-11-09 04:24:46 +0100 |
commit | 8b93220d09adc6a56c9b0a7bfa3a9084e03ce25f (patch) | |
tree | 3fdda81262b12c0c8b07f7f26834dbc24ff3dbcb /src/wii/u8archive.py | |
parent | 39d905c4684b474e13ab3298fca08453f4c14834 (diff) | |
download | koopatlas-8b93220d09adc6a56c9b0a7bfa3a9084e03ce25f.tar.gz koopatlas-8b93220d09adc6a56c9b0a7bfa3a9084e03ce25f.zip |
quick fix to make the WiiArchiveU8 API a bit prettier
Diffstat (limited to 'src/wii/u8archive.py')
-rw-r--r-- | src/wii/u8archive.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/wii/u8archive.py b/src/wii/u8archive.py index faad114..9ae1ef5 100644 --- a/src/wii/u8archive.py +++ b/src/wii/u8archive.py @@ -19,7 +19,10 @@ class WiiArchiveU8: if handle: if not hasattr(handle, 'read'): - handle = cStringIO.StringIO(handle) + if handle[0:4] == "U\xAA8\x2D": + handle = cStringIO.StringIO(handle) + else: + handle = open(handle, 'rb') info = WiiArchiveU8.ReadInfo() info.startPos = handle.tell() |