forked from p15670423/monkey
minor bug fix
This commit is contained in:
parent
3a24ad4058
commit
b5b8423df7
|
@ -5,6 +5,8 @@ __author__ = 'hoffer'
|
||||||
|
|
||||||
MONKEYFS_PREFIX = 'monkeyfs://'
|
MONKEYFS_PREFIX = 'monkeyfs://'
|
||||||
|
|
||||||
|
open_orig = open
|
||||||
|
|
||||||
class VirtualFile(BytesIO):
|
class VirtualFile(BytesIO):
|
||||||
_vfs = {} #virtual File-System
|
_vfs = {} #virtual File-System
|
||||||
|
|
||||||
|
@ -50,4 +52,4 @@ def open(name, mode='r', buffering=-1):
|
||||||
if name.startswith(MONKEYFS_PREFIX):
|
if name.startswith(MONKEYFS_PREFIX):
|
||||||
return VirtualFile(name, mode, buffering)
|
return VirtualFile(name, mode, buffering)
|
||||||
else:
|
else:
|
||||||
return open(name, mode=mode, buffering=buffering)
|
return open_orig(name, mode=mode, buffering=buffering)
|
||||||
|
|
Loading…
Reference in New Issue