Skip to content

Commit

Permalink
fix for directory not exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Krishna-Singhal authored Feb 10, 2022
1 parent 59cedd1 commit 989ca5f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/logo_maker.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ async def logo_maker(text: str, keyword: str = "name"):

async def download(uri: str, file_name: str):
""" download a uri """
if not os.path.exists("temp_logos/"):
os.mkdir("temp_logos/")
async with \
aiofiles.open(file_name, "wb+") as file, \
aiohttp.ClientSession(headers=HEADERS) as session, \
Expand Down

0 comments on commit 989ca5f

Please sign in to comment.