mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-10-31 18:58:01 +00:00
corrects locations found in comments
This commit is contained in:
@@ -40,7 +40,7 @@ class LFRequest:
|
|||||||
headers=self.default_headers)
|
headers=self.default_headers)
|
||||||
else:
|
else:
|
||||||
request = urllib.request.Request(url=self.requested_url, headers=self.default_headers)
|
request = urllib.request.Request(url=self.requested_url, headers=self.default_headers)
|
||||||
print("No data for this jsonPost?")
|
print("No data for this formPost?")
|
||||||
|
|
||||||
request.headers['Content-type'] = 'application/x-www-form-urlencoded'
|
request.headers['Content-type'] = 'application/x-www-form-urlencoded'
|
||||||
resp = ''
|
resp = ''
|
||||||
@@ -125,7 +125,7 @@ class LFRequest:
|
|||||||
return myresponses[0]
|
return myresponses[0]
|
||||||
except urllib.error.HTTPError as error:
|
except urllib.error.HTTPError as error:
|
||||||
if (show_error):
|
if (show_error):
|
||||||
print("----- jsonPost() HTTPError: --------------------------------------------")
|
print("----- get() HTTPError: --------------------------------------------")
|
||||||
print("<%s> HTTP %s: %s"%(myrequest.get_full_url(), error.code, error.reason, ))
|
print("<%s> HTTP %s: %s"%(myrequest.get_full_url(), error.code, error.reason, ))
|
||||||
|
|
||||||
print("Error: ", sys.exc_info()[0])
|
print("Error: ", sys.exc_info()[0])
|
||||||
@@ -147,7 +147,7 @@ class LFRequest:
|
|||||||
print("------------------------------------------------------------------------")
|
print("------------------------------------------------------------------------")
|
||||||
except urllib.error.URLError as uerror:
|
except urllib.error.URLError as uerror:
|
||||||
if (show_error):
|
if (show_error):
|
||||||
print("----- jsonPost() URLError: ---------------------------------------------")
|
print("----- get() URLError: ---------------------------------------------")
|
||||||
print("Reason: %s; URL: %s"%(uerror.reason, myrequest.get_full_url()))
|
print("Reason: %s; URL: %s"%(uerror.reason, myrequest.get_full_url()))
|
||||||
print("------------------------------------------------------------------------")
|
print("------------------------------------------------------------------------")
|
||||||
return None
|
return None
|
||||||
|
|||||||
Reference in New Issue
Block a user