Skip to content

Commit e2ab582

Browse files
authored
Avoid unreachable message for non-HTTP mirrors (#701)
When using a scheme for a mirror that is not HTTP, such as ftp:, mirror:, or file:, mintupdate reports a message that the mirror cannot be reached. In actuality, the mirror very well may be reachable but it cannot check that using an HTTP request. Rather than trying to implement support for all the protocols in sources.list(5), this skips the check for any mirror_url that doesn't start with `http`. ref: jmunixusers/cs-vm-build#475
1 parent 497d89c commit e2ab582

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

usr/lib/linuxmint/mintUpdate/mintUpdate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,8 +1078,8 @@ def mirror_check(self):
10781078
if mirror_url.endswith("/"):
10791079
mirror_url = mirror_url[:-1]
10801080
break
1081-
if mirror_url is None:
1082-
# Unable to find the Mint mirror being used..
1081+
if mirror_url is None or not mirror_url.startswith("http"):
1082+
# The Mint mirror being used either cannot be found or is not an HTTP(s) mirror
10831083
pass
10841084
elif mirror_url == "http://packages.linuxmint.com":
10851085
if not self.application.settings.get_boolean("default-repo-is-ok"):

0 commit comments

Comments
 (0)