mypy: zulip: Fix errors in integrations/log2zulip/log2zulip.

This commit is contained in:
Alena Volkova 2017-10-11 18:17:10 -04:00
parent 995dc33334
commit 7ad3324aaa
2 changed files with 2 additions and 3 deletions

View file

@ -19,7 +19,6 @@ os.chdir(os.path.dirname(TOOLS_DIR))
sys.path.append(os.path.dirname(TOOLS_DIR))
exclude = """
zulip/integrations/log2zulip/log2zulip
zulip/integrations/perforce/zulip_perforce_config.py
zulip/integrations/perforce/git_p4.py
zulip/integrations/svn/zulip_svn_config.py

View file

@ -97,7 +97,7 @@ def process_logs():
open(data_file_path, "w").write(json.dumps(new_data))
if __name__ == "__main__":
parser = zulip.add_default_arguments(argparse.ArgumentParser()) # type: argparse.ArgumentParser3
parser = zulip.add_default_arguments(argparse.ArgumentParser()) # type: argparse.ArgumentParser
parser.add_argument("--control-path", default="/etc/log2zulip.conf")
args = parser.parse_args()
@ -115,7 +115,7 @@ if __name__ == "__main__":
zulip_client = zulip.init_from_options(args)
try:
log_files = json.loads(open(args.control_path, "r").read())
except (json.JSONDecodeError, IOError):
except (json.JSONDecodeError, IOError): # type: ignore # error: Cannot determine type of 'IOError'
print("Could not load control data from %s" % (args.control_path,))
traceback.print_exc()
sys.exit(1)