Modernize legacy Python 2 syntax with pyupgrade.

Generated by `pyupgrade --py3-plus --keep-percent-format` followed by
manual indentation fixes.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg 2020-04-09 17:14:01 -07:00 committed by Tim Abbott
parent 543eb396b9
commit e30b3b094b
107 changed files with 192 additions and 244 deletions

View file

@ -112,8 +112,8 @@ if __name__ == "__main__":
open(lock_path, "w").write("1")
zulip_client = zulip.init_from_options(args)
try:
log_files = json.loads(open(args.control_path, "r").read())
except (json.JSONDecodeError, IOError): # type: ignore # error: Cannot determine type of 'IOError'
log_files = json.loads(open(args.control_path).read())
except (json.JSONDecodeError, OSError): # 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)