From 7e2421e5c2dfa1fe116d0dc910e8c09c4a0f985b Mon Sep 17 00:00:00 2001 From: BigweldIndustries <75338791+BigweldIndustries@users.noreply.github.com> Date: Sun, 20 Mar 2022 17:00:41 +0000 Subject: [PATCH] Close files after use for setup script This is a good practice in python, and while negligible, is better to do. --- scripts/setup/generate.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/setup/generate.py b/scripts/setup/generate.py index ab6a4ae..83b8c6f 100644 --- a/scripts/setup/generate.py +++ b/scripts/setup/generate.py @@ -1,6 +1,6 @@ -# script to: -# - get all repo git urls from the fosscord orga and format them to make the process of updating the setup script less tiresome -# - create a workspace file for VScode +# Script to: +# - Get all repo git urls from the fosscord orga and format them to make the process of updating the setup script less tiresome +# - Create a workspace file for VScode import requests @@ -17,6 +17,8 @@ for repo in response: with open("clone_all_repos.sh","w") as f: f.write(repos) + f.close() with open("fosscord.code-workspace", "w") as f: f.write(str(workspace).replace("'",'"')) + f.close()