App.get_value(): Remove redundant fd.close()
The fd.close() call inside the `with open(...) as fd:` block is redundant because the file handle is managed by the context manager. Remove it.
Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL and pi.devSigned-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
09e41df0ed
commit
fdae5ad122
1 changed files with 0 additions and 1 deletions
|
|
@ -545,7 +545,6 @@ class App(Base):
|
||||||
try:
|
try:
|
||||||
with open(version_path) as fd:
|
with open(version_path) as fd:
|
||||||
ret = fd.read().replace('\n', '').replace('-dev', '')
|
ret = fd.read().replace('\n', '').replace('-dev', '')
|
||||||
fd.close()
|
|
||||||
return ret
|
return ret
|
||||||
except EnvironmentError:
|
except EnvironmentError:
|
||||||
log(DEBUG, f'Ignoring unreadable file "{version_path}"')
|
log(DEBUG, f'Ignoring unreadable file "{version_path}"')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue