diff --git a/chaos_monkey/monkey-linux.spec b/chaos_monkey/monkey-linux.spec index 16e88810d..5ebd9779e 100644 --- a/chaos_monkey/monkey-linux.spec +++ b/chaos_monkey/monkey-linux.spec @@ -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, diff --git a/chaos_monkey/monkey.spec b/chaos_monkey/monkey.spec index 8f3418ecb..e233d64f5 100644 --- a/chaos_monkey/monkey.spec +++ b/chaos_monkey/monkey.spec @@ -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) diff --git a/chaos_monkey/monkeyfs.py b/chaos_monkey/monkeyfs.py index 5e10688bf..dabd3a7eb 100644 --- a/chaos_monkey/monkeyfs.py +++ b/chaos_monkey/monkeyfs.py @@ -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):