mypy: zulip: Fix errors in integrations/log2zulip/log2zulip.
This commit is contained in:
parent
995dc33334
commit
7ad3324aaa
|
@ -19,7 +19,6 @@ os.chdir(os.path.dirname(TOOLS_DIR))
|
||||||
sys.path.append(os.path.dirname(TOOLS_DIR))
|
sys.path.append(os.path.dirname(TOOLS_DIR))
|
||||||
|
|
||||||
exclude = """
|
exclude = """
|
||||||
zulip/integrations/log2zulip/log2zulip
|
|
||||||
zulip/integrations/perforce/zulip_perforce_config.py
|
zulip/integrations/perforce/zulip_perforce_config.py
|
||||||
zulip/integrations/perforce/git_p4.py
|
zulip/integrations/perforce/git_p4.py
|
||||||
zulip/integrations/svn/zulip_svn_config.py
|
zulip/integrations/svn/zulip_svn_config.py
|
||||||
|
|
|
@ -97,7 +97,7 @@ def process_logs():
|
||||||
open(data_file_path, "w").write(json.dumps(new_data))
|
open(data_file_path, "w").write(json.dumps(new_data))
|
||||||
|
|
||||||
if __name__ == "__main__":
|
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")
|
parser.add_argument("--control-path", default="/etc/log2zulip.conf")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ if __name__ == "__main__":
|
||||||
zulip_client = zulip.init_from_options(args)
|
zulip_client = zulip.init_from_options(args)
|
||||||
try:
|
try:
|
||||||
log_files = json.loads(open(args.control_path, "r").read())
|
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,))
|
print("Could not load control data from %s" % (args.control_path,))
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
Loading…
Reference in a new issue