Added grequests to hidden imports.

Fixed dict lookup in monkeyfs
This commit is contained in:
daniel goldberg 2016-09-04 13:45:49 +03:00
parent 12ff0c5677
commit fc19da7427
3 changed files with 5 additions and 4 deletions

View File

@ -7,7 +7,7 @@ a = Analysis(['main.py'],
pathex=['.'],
binaries=None,
datas=None,
hiddenimports=['_cffi_backend'],
hiddenimports=['_cffi_backend','grequests'],
hookspath=None,
runtime_hooks=None,
excludes=None,

View File

@ -3,7 +3,7 @@ import os
import platform
a = Analysis(['main.py'],
pathex=['.'],
hiddenimports=['_cffi_backend', 'queue'],
hiddenimports=['_cffi_backend', 'queue','grequests'],
hookspath=None,
runtime_hooks=None)

View File

@ -16,7 +16,7 @@ class VirtualFile(BytesIO):
name = MONKEYFS_PREFIX + name
self.name = name
self._mode = mode
if VirtualFile._vfs.has_key(name):
if name in VirtualFile._vfs:
super(VirtualFile, self).__init__(self._vfs[name])
else:
super(VirtualFile, self).__init__('')
@ -31,7 +31,8 @@ class VirtualFile(BytesIO):
@staticmethod
def isfile(path):
return VirtualFile._vfs.has_key(path)
return path in VirtualFile._vfs
def getsize(path):