forked from p15670423/monkey
Added grequests to hidden imports.
Fixed dict lookup in monkeyfs
This commit is contained in:
parent
12ff0c5677
commit
fc19da7427
|
@ -7,7 +7,7 @@ a = Analysis(['main.py'],
|
||||||
pathex=['.'],
|
pathex=['.'],
|
||||||
binaries=None,
|
binaries=None,
|
||||||
datas=None,
|
datas=None,
|
||||||
hiddenimports=['_cffi_backend'],
|
hiddenimports=['_cffi_backend','grequests'],
|
||||||
hookspath=None,
|
hookspath=None,
|
||||||
runtime_hooks=None,
|
runtime_hooks=None,
|
||||||
excludes=None,
|
excludes=None,
|
||||||
|
|
|
@ -3,7 +3,7 @@ import os
|
||||||
import platform
|
import platform
|
||||||
a = Analysis(['main.py'],
|
a = Analysis(['main.py'],
|
||||||
pathex=['.'],
|
pathex=['.'],
|
||||||
hiddenimports=['_cffi_backend', 'queue'],
|
hiddenimports=['_cffi_backend', 'queue','grequests'],
|
||||||
hookspath=None,
|
hookspath=None,
|
||||||
runtime_hooks=None)
|
runtime_hooks=None)
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ class VirtualFile(BytesIO):
|
||||||
name = MONKEYFS_PREFIX + name
|
name = MONKEYFS_PREFIX + name
|
||||||
self.name = name
|
self.name = name
|
||||||
self._mode = mode
|
self._mode = mode
|
||||||
if VirtualFile._vfs.has_key(name):
|
if name in VirtualFile._vfs:
|
||||||
super(VirtualFile, self).__init__(self._vfs[name])
|
super(VirtualFile, self).__init__(self._vfs[name])
|
||||||
else:
|
else:
|
||||||
super(VirtualFile, self).__init__('')
|
super(VirtualFile, self).__init__('')
|
||||||
|
@ -31,7 +31,8 @@ class VirtualFile(BytesIO):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def isfile(path):
|
def isfile(path):
|
||||||
return VirtualFile._vfs.has_key(path)
|
return path in VirtualFile._vfs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def getsize(path):
|
def getsize(path):
|
||||||
|
|
Loading…
Reference in New Issue