mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
Merge pull request #3798 from pypeclub/bugfix/py2_comp_resolve
Resolve: Addon import is Python 2 compatible
This commit is contained in:
commit
5f6963c9f7
1 changed files with 5 additions and 5 deletions
|
|
@ -17,7 +17,7 @@ def setup(env):
|
||||||
|
|
||||||
# collect script dirs
|
# collect script dirs
|
||||||
if us_env:
|
if us_env:
|
||||||
log.info(f"Utility Scripts Env: `{us_env}`")
|
log.info("Utility Scripts Env: `{}`".format(us_env))
|
||||||
us_paths = us_env.split(
|
us_paths = us_env.split(
|
||||||
os.pathsep) + us_paths
|
os.pathsep) + us_paths
|
||||||
|
|
||||||
|
|
@ -25,13 +25,13 @@ def setup(env):
|
||||||
for path in us_paths:
|
for path in us_paths:
|
||||||
scripts.update({path: os.listdir(path)})
|
scripts.update({path: os.listdir(path)})
|
||||||
|
|
||||||
log.info(f"Utility Scripts Dir: `{us_paths}`")
|
log.info("Utility Scripts Dir: `{}`".format(us_paths))
|
||||||
log.info(f"Utility Scripts: `{scripts}`")
|
log.info("Utility Scripts: `{}`".format(scripts))
|
||||||
|
|
||||||
# make sure no script file is in folder
|
# make sure no script file is in folder
|
||||||
for s in os.listdir(us_dir):
|
for s in os.listdir(us_dir):
|
||||||
path = os.path.join(us_dir, s)
|
path = os.path.join(us_dir, s)
|
||||||
log.info(f"Removing `{path}`...")
|
log.info("Removing `{}`...".format(path))
|
||||||
if os.path.isdir(path):
|
if os.path.isdir(path):
|
||||||
shutil.rmtree(path, onerror=None)
|
shutil.rmtree(path, onerror=None)
|
||||||
else:
|
else:
|
||||||
|
|
@ -44,7 +44,7 @@ def setup(env):
|
||||||
# script in script list
|
# script in script list
|
||||||
src = os.path.join(d, s)
|
src = os.path.join(d, s)
|
||||||
dst = os.path.join(us_dir, s)
|
dst = os.path.join(us_dir, s)
|
||||||
log.info(f"Copying `{src}` to `{dst}`...")
|
log.info("Copying `{}` to `{}`...".format(src, dst))
|
||||||
if os.path.isdir(src):
|
if os.path.isdir(src):
|
||||||
shutil.copytree(
|
shutil.copytree(
|
||||||
src, dst, symlinks=False,
|
src, dst, symlinks=False,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue