You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
738 B
Python
30 lines
738 B
Python
#!/usr/bin/env python3
|
|
#
|
|
# Architect Installation Framework (2016-2017)
|
|
#
|
|
# Written by Carl Duff and @mandog for Archlinux
|
|
# Heavily modified and re-written by @Chrysostomus to install Manjaro instead
|
|
# Contributors: @papajoker, @oberon, and the Manjaro-Community.
|
|
#
|
|
# This program is free software, provided under the GNU General Public License
|
|
# as published by the Free Software Foundation. So feel free to copy, distribute,
|
|
# or modify it as you wish.
|
|
|
|
"""connectivity check, kindly contributed by @fhdk"""
|
|
|
|
import sys
|
|
from urllib.request import urlopen
|
|
|
|
remote_host = "https://manjaro.org"
|
|
maxwait = 2
|
|
data = None
|
|
try:
|
|
data = urlopen(remote_host, timeout=maxwait)
|
|
except:
|
|
pass
|
|
|
|
if data:
|
|
sys.exit(0)
|
|
else:
|
|
sys.exit(1)
|