From c6e7ddfb031610714aa8b853814542dcf8dd7fbf Mon Sep 17 00:00:00 2001 From: derAnfaenger Date: Tue, 12 Sep 2017 11:02:29 +0200 Subject: [PATCH] zulip package: Make check for provision failsafe. It is not guaranteed that the integration scripts in the Zulip repository even specify a `provision` option. Therefore, checking the value of this option would fail. Updating this with getattr and a default value. --- zulip/zulip/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zulip/zulip/__init__.py b/zulip/zulip/__init__.py index 06b6183..e6bcb96 100644 --- a/zulip/zulip/__init__.py +++ b/zulip/zulip/__init__.py @@ -228,7 +228,7 @@ def generate_option_group(parser, prefix=''): def init_from_options(options, client=None): # type: (Any, Optional[str]) -> Client - if options.provision: + if getattr(options, 'provision', False): requirements_path = os.path.abspath(os.path.join(sys.path[0], 'requirements.txt')) try: import pip