minor bug fix

This commit is contained in:
Barak Hoffer 2015-10-01 15:32:28 +03:00
parent 3a24ad4058
commit b5b8423df7
1 changed files with 3 additions and 1 deletions

View File

@ -5,6 +5,8 @@ __author__ = 'hoffer'
MONKEYFS_PREFIX = 'monkeyfs://'
open_orig = open
class VirtualFile(BytesIO):
_vfs = {} #virtual File-System
@ -50,4 +52,4 @@ def open(name, mode='r', buffering=-1):
if name.startswith(MONKEYFS_PREFIX):
return VirtualFile(name, mode, buffering)
else:
return open(name, mode=mode, buffering=buffering)
return open_orig(name, mode=mode, buffering=buffering)