Skip to content

Commit

Permalink
fix open code scanning by "with"
Browse files Browse the repository at this point in the history
  • Loading branch information
outscale-mal committed Sep 14, 2023
1 parent 1d974dd commit ddbb504
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions osc_tui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ def main():
i += 1
if i == argc:
if os.path.isfile(profileSelector.dst_file):
configFile = open(profileSelector.dst_file)
OAPI_CREDENTIALS = json.loads(configFile.read())
print("Profiles:")
for c in OAPI_CREDENTIALS:
print(str(c))
with open(profileSelector.dst_file, 'r') as configFile:
OAPI_CREDENTIALS = json.loads(configFile.read())
print("Profiles:")
for c in OAPI_CREDENTIALS:
print(str(c))
else:
print("{} not found, can't read profile !!!".
format(profileSelector.dst_file),
Expand Down

0 comments on commit ddbb504

Please sign in to comment.