From b46b4d2045aee0242e42e2ecfa9b9c02c02d6f6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Marqui=CC=81nez=20Ferra=CC=81ndiz?= Date: Wed, 16 Feb 2022 21:34:24 +0100 Subject: [PATCH] fish plugin: Simplify directory creation --- beetsplug/fish.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/beetsplug/fish.py b/beetsplug/fish.py index a578c7397..5f3ecd78e 100644 --- a/beetsplug/fish.py +++ b/beetsplug/fish.py @@ -105,11 +105,7 @@ class FishPlugin(BeetsPlugin): completion_file_path = os.path.join(completion_dir, 'beet.fish') if completion_dir != '': - try: - os.makedirs(completion_dir) - except OSError: - if not os.path.isdir(completion_dir): - raise + os.makedirs(completion_dir, exist_ok=True) nobasicfields = opts.noFields # Do not complete for album/track fields extravalues = opts.extravalues # e.g., Also complete artists names