Skip to content

Commit

Permalink
fixed warning of unclosed json file
Browse files Browse the repository at this point in the history
  • Loading branch information
bogind committed Jul 15, 2024
1 parent c005d9f commit 0196f66
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion qgs_sound_effects_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ def tr(self, string):

def initAlgorithm(self, config):
self.plugin_dir = os.path.dirname(__file__)
self.sounds_config = json.load(open(os.path.join(self.plugin_dir,'sounds.json')))
with open(os.path.join(self.plugin_dir,'sounds.json')) as f:
self.sounds_config = json.load(f)
f.close()
self.sound_names = [self.sounds_config[s]['label'] for s in self.sounds_config.keys()]

sound_param = QgsProcessingParameterEnum(
Expand Down

0 comments on commit 0196f66

Please sign in to comment.