Closed chris-lesage closed 1 year ago
In https://github.com/mgear-dev/mgear4/blob/master/release/scripts/mgear/shifter/__init__.py
In the method data_collector_output()
f = open(file_path, "w") f.write(json.dumps(self.build_data, indent=4)) f.close() file_path = None
Should be rewritten as the safer and recommended with statement:
with open(file_path, 'w') as f: f.write(json.dumps(self.build_data, indent=4)) file_path = None
Thanks @chris-lesage I will review this
In https://github.com/mgear-dev/mgear4/blob/master/release/scripts/mgear/shifter/__init__.py
In the method data_collector_output()
Should be rewritten as the safer and recommended with statement: