Skip to content

Commit

Permalink
Don't try to create conf_dir if it already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
sebr committed Jan 19, 2020
1 parent 45fc235 commit a92b938
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/bhyve/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ async def async_setup(hass, config):

# Create storage/scratch directory.
try:
os.mkdir(conf_dir)
if not os.path.exists(conf_dir):
os.mkdir(conf_dir)
except Exception as err:
_LOGGER.info("Could not create storage dir: %s", err)
pass
Expand Down

0 comments on commit a92b938

Please sign in to comment.