Skip to content

Commit

Permalink
Check site-packages does not exist before mkdiring it
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSignPainter98 committed Jul 2, 2021
1 parent 760edb1 commit 49764f2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions adjustkeys/adjustkeys_addon.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ from sys import path, version_info
# Allow site-packages to contain dll files (e.g. where the user needs to copy them in due to missing installers / packages)
if version_info >= (3,8) and system() == 'Windows':
from os import add_dll_directory, mkdir
from os.path import join
from os.path import exists, join
site_packages_path = join(dirname(__file__), 'site-packages')
mkdir(site_packages_path)
if not exists(site_packages_path):
mkdir(site_packages_path)
add_dll_directory(site_packages_path)


Expand Down

0 comments on commit 49764f2

Please sign in to comment.