|
@@ -5,7 +5,7 @@ from dulwich import porcelain
|
|
|
from dulwich.porcelain import get_remote_repo
|
|
|
from dulwich.repo import Repo
|
|
|
from dulwich.walk import Walker
|
|
|
-import urllib.request
|
|
|
+import requests
|
|
|
|
|
|
def ro():
|
|
|
os.system("/etc/init.d/S01mount_ro start")
|
|
@@ -91,8 +91,8 @@ def isOnline(localRep):
|
|
|
r = Repo(localRep)
|
|
|
(remote_name, remote_location) = get_remote_repo(r, None)
|
|
|
try:
|
|
|
- response = urllib.request.urlopen(remote_location, timeout=0)
|
|
|
- if response.status == 200:
|
|
|
+ response = requests.get(remote_location)
|
|
|
+ if response.status_code == 200:
|
|
|
# print("Connection successful.")
|
|
|
return True
|
|
|
else:
|