Skip to content

Commit 004866c

Browse files
authored
Update extract and dest paths for select2 JS lib in tasks.py
1 parent 244e2e1 commit 004866c

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

tasks.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,11 @@ def setup(c):
100100

101101
zipstr = BytesIO(urlopen(select2).read())
102102
zipfile_obj = zipfile.ZipFile(zipstr)
103-
zipfile_obj.extractall(STATIC_LIB)
103+
zip_dst_dir = STATIC_LIB / ''
104+
zipfile_obj.extractall(zip_dst_dir)
104105

105-
dirname = list(STATIC_LIB.glob('select2-*'))[0]
106-
dstdir = ''.join(dirname.name.rsplit('-', 1)[:-1])
106+
dirname = list(zip_dst_dir.glob('select2-*'))[0]
107+
dstdir = STATIC_LIB / 'select2'
107108

108109
try:
109110
os.rename(dirname, dstdir)

0 commit comments

Comments
 (0)