diff options
author | Nejc Habjan <nejc.habjan@siemens.com> | 2022-01-23 10:04:31 +0100 |
---|---|---|
committer | John Villalovos <john@sodarock.com> | 2022-01-23 07:14:49 -0800 |
commit | dc32d54c49ccc58c01cd436346a3fbfd4a538778 (patch) | |
tree | dfce87b5e50f49229bd3ff5d62c2d26618046409 /gitlab/cli.py | |
parent | 618267ced7aaff46d8e03057fa0cab48727e5dc0 (diff) | |
download | gitlab-dc32d54c49ccc58c01cd436346a3fbfd4a538778.tar.gz |
chore: consistently use open() encoding and file descriptor
Diffstat (limited to 'gitlab/cli.py')
-rw-r--r-- | gitlab/cli.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gitlab/cli.py b/gitlab/cli.py index b9a7574..c4af4b8 100644 --- a/gitlab/cli.py +++ b/gitlab/cli.py @@ -257,8 +257,8 @@ def _parse_value(v: Any) -> Any: # If the user-provided value starts with @, we try to read the file # path provided after @ as the real value. Exit on any error. try: - with open(v[1:]) as fl: - return fl.read() + with open(v[1:]) as f: + return f.read() except Exception as e: sys.stderr.write(f"{e}\n") sys.exit(1) |