mirror of
https://github.com/home-assistant/core.git
synced 2025-11-16 06:20:07 +00:00
Remove unnecessary checks before calling os.makedirs (#62576)
This commit is contained in:
@@ -492,8 +492,7 @@ def setup_platform(
|
||||
offset: datetime.timedelta = config[CONF_OFFSET]
|
||||
include_tomorrow = config[CONF_TOMORROW]
|
||||
|
||||
if not os.path.exists(gtfs_dir):
|
||||
os.makedirs(gtfs_dir)
|
||||
os.makedirs(gtfs_dir, exist_ok=True)
|
||||
|
||||
if not os.path.exists(os.path.join(gtfs_dir, data)):
|
||||
_LOGGER.error("The given GTFS data file/folder was not found")
|
||||
|
||||
Reference in New Issue
Block a user