misc: close files (#76433) #30

Merged
fpeters merged 1 commits from wip/76433-close-files into main 2023-04-14 07:53:58 +02:00
Owner

D'un grep ceux qui resteraient sont dans des commandes, courte durée, fichiers automatiquement fermés à la fin de l'exécution, je n'y touche pas :

hobo/agent/authentic2/management/commands/hobo_deploy.py:        for role in serializers.deserialize('json', open(roles_filename)):
hobo/agent/common/management/commands/hobo_deploy.py:    f = os.fdopen(fd, 'w')
hobo/agent/common/management/commands/hobo_deploy.py:                hobo_environment = json.load(open(json_filename))
hobo/agent/common/management/commands/hobo_deploy.py:            if not ignore_timestamp and json.load(open(tenant_hobo_json)).get('timestamp') == timestamp:
hobo/agent/common/management/commands/hobo_notify.py:            return json.load(open(notification))
hobo/environment/management/commands/cook.py:        recipe = json.load(open(filename))
hobo/environment/management/commands/cook.py:                json.load(open(os.path.join(os.path.dirname(filename), recipe['load-variables-from'])))
D'un grep ceux qui resteraient sont dans des commandes, courte durée, fichiers automatiquement fermés à la fin de l'exécution, je n'y touche pas : ``` hobo/agent/authentic2/management/commands/hobo_deploy.py: for role in serializers.deserialize('json', open(roles_filename)): hobo/agent/common/management/commands/hobo_deploy.py: f = os.fdopen(fd, 'w') hobo/agent/common/management/commands/hobo_deploy.py: hobo_environment = json.load(open(json_filename)) hobo/agent/common/management/commands/hobo_deploy.py: if not ignore_timestamp and json.load(open(tenant_hobo_json)).get('timestamp') == timestamp: hobo/agent/common/management/commands/hobo_notify.py: return json.load(open(notification)) hobo/environment/management/commands/cook.py: recipe = json.load(open(filename)) hobo/environment/management/commands/cook.py: json.load(open(os.path.join(os.path.dirname(filename), recipe['load-variables-from']))) ```
fpeters added 1 commit 2023-04-08 19:47:57 +02:00
gitea/hobo/pipeline/head This commit looks good Details
1f50951cb1
misc: close files (#76433)
fpeters changed title from WIP: misc: close files (#76433) to misc: close files (#76433) 2023-04-10 10:17:40 +02:00
lguerin approved these changes 2023-04-10 10:33:57 +02:00
fpeters merged commit bb21ef72e7 into main 2023-04-14 07:53:58 +02:00
fpeters deleted branch wip/76433-close-files 2023-04-14 07:53:58 +02:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: entrouvert/hobo#30
No description provided.