Skip to content

Commit

Permalink
ci: Fix script run fail in some case
Browse files Browse the repository at this point in the history
Signed-off-by: Huaqi Fang <578567190@qq.com>
  • Loading branch information
fanghuaqi committed Dec 30, 2023
1 parent dc53e71 commit 186d16f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/prepare_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def setup_gd_openocd(toolsdir, gd_openocd_uri, system_value, nsideloc, reuse):
else:
org_folder = gd_openocd_uri
if os.path.isdir(os.path.join(org_folder, "scripts")) == False:
print("This may not be a valid openocd package!" % (org_folder))
print("This %s may not be a valid openocd package!" % (org_folder))
sys.exit(1)
# Rename the old openocd folder to gd_openocd
if os.path.isdir(destination_folder) == False:
Expand All @@ -190,13 +190,12 @@ def setup_gd_openocd(toolsdir, gd_openocd_uri, system_value, nsideloc, reuse):
REUSE_ARCHIVE = True

def is_valid_url(url):
if not url:
return False
try:
result = urlparse(url)
return True
if url and urlparse(url).netloc != "":
return True
except:
return False
pass
return False

def prepare_tools(prebltloc=PREBLT_TOOLS, nside=None, gdocd=None):
ostype = platform.system()
Expand Down

0 comments on commit 186d16f

Please # to comment.