use nw_check.py
parent
17f43a3467
commit
a638febb8d
@ -0,0 +1,29 @@
|
||||
#!/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)
|
Loading…
Reference in New Issue