Skip to content

Commit 1986e5a

Browse files
committed
master 2 main
1 parent bb99996 commit 1986e5a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

imagepy/menus/Plugins/Install/installplg_plgs.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import os, subprocess, zipfile, shutil
55

66
import zipfile, sys, urllib
7-
path = 'https://github.com/Image-Py/imagepy/archive/master.zip'
7+
path = 'https://github.com/Image-Py/imagepy/archive/main.zip'
88

99
from urllib.request import urlretrieve
1010
import urllib
@@ -37,9 +37,9 @@ def run(self, para=None):
3737
url = para['repo']
3838
if 'github.com' in url:
3939
if url[-4:] == '.git':
40-
url = url.replace('.git', '/archive/master.zip')
40+
url = url.replace('.git', '/archive/main.zip')
4141
elif url[-4:] != '.zip':
42-
url = url + '/archive/master.zip'
42+
url = url + '/archive/main.zip'
4343
domain, name = url.split('/')[-4:-2]
4444
else:
4545
domain, name = (url[:-4].replace('.','-')).split('/')[-2:]
@@ -62,7 +62,7 @@ def run(self, para=None):
6262
zipf = zipfile.ZipFile(os.path.join(path_cache, domain+'_'+name+'.zip'))
6363
folder = zipf.namelist()[0]
6464
zipf.extractall(path_cache)
65-
destpath = os.path.join(path_plgs, domain+'_'+folder.replace('-master',''))
65+
destpath = os.path.join(path_plgs, domain+'_'+folder.replace('-main',''))
6666
if os.path.exists(destpath): shutil.rmtree(destpath)
6767
os.rename(os.path.join(path_cache, folder), destpath)
6868
zipf.close()

0 commit comments

Comments
 (0)