summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2011-11-09 04:24:46 +0100
committerTreeki <treeki@gmail.com>2011-11-09 04:24:46 +0100
commit8b93220d09adc6a56c9b0a7bfa3a9084e03ce25f (patch)
tree3fdda81262b12c0c8b07f7f26834dbc24ff3dbcb
parent39d905c4684b474e13ab3298fca08453f4c14834 (diff)
downloadkoopatlas-8b93220d09adc6a56c9b0a7bfa3a9084e03ce25f.tar.gz
koopatlas-8b93220d09adc6a56c9b0a7bfa3a9084e03ce25f.zip
quick fix to make the WiiArchiveU8 API a bit prettier
-rw-r--r--src/wii/u8archive.py5
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()