mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 03:37:55 +00:00
Moved leading/trailing slash check to prevent NoneType Errors
This commit is contained in:
@@ -27,9 +27,9 @@ class LFRequest:
|
|||||||
if "http://" not in url or "https://" not in url:
|
if "http://" not in url or "https://" not in url:
|
||||||
print("No http:// or https:// found, prepending http://")
|
print("No http:// or https:// found, prepending http://")
|
||||||
url = "http://" + url
|
url = "http://" + url
|
||||||
if not url.endswith('/') and not uri.startswith('/'):
|
|
||||||
url += '/'
|
|
||||||
if uri is not None:
|
if uri is not None:
|
||||||
|
if not url.endswith('/') and not uri.startswith('/'):
|
||||||
|
url += '/'
|
||||||
self.requested_url = url + uri
|
self.requested_url = url + uri
|
||||||
if self.requested_url.find('//'):
|
if self.requested_url.find('//'):
|
||||||
protopos = self.requested_url.find("://")
|
protopos = self.requested_url.find("://")
|
||||||
|
|||||||
Reference in New Issue
Block a user