mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 01:30:07 +01:00
Split the URL into the link and filename parts for the error message.
This commit is contained in:
@@ -190,10 +190,13 @@ def download_file(url, dest=None, force=False, trusted=False):
|
||||
if not success:
|
||||
success = download_pip(url, filename, force, trusted) # Try urllib
|
||||
if not success:
|
||||
split_url = url.split('/')
|
||||
msg = '\n'.join([
|
||||
"\n\nERROR in Web Access! - you may be behind a firewall",
|
||||
"You may be able to bybass this by using a browser to download:",
|
||||
"\n\t%s\n\nand copying to:\n\n\t%s" % (url, filename),
|
||||
"\n\nERROR in Web Access! - You may be behind a firewall!",
|
||||
"-" * 52,
|
||||
"You should be able to bybass this by using a browser to download:",
|
||||
"\t%s\nfrom:\t%s\nthen copying the download file to:\n\t%s" % (
|
||||
split_url[-1], '/'.join(split_url[:-1]), filename),
|
||||
])
|
||||
print(msg, '\n')
|
||||
wx.MessageBox(msg, caption='WDOWNLOAD ERROR!',
|
||||
|
||||
Reference in New Issue
Block a user