mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-10-31 02:38:03 +00:00 
			
		
		
		
	create_wanlink: Fix incorect Type error
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
This commit is contained in:
		| @@ -34,7 +34,7 @@ j_printer = pprint.PrettyPrinter(indent=2) | |||||||
| resource_id = 1 | resource_id = 1 | ||||||
|  |  | ||||||
|  |  | ||||||
| def main(args={}): | def main(args): | ||||||
|     base_url = 'http://'+args['host']+':8080' |     base_url = 'http://'+args['host']+':8080' | ||||||
|     print(base_url) |     print(base_url) | ||||||
|     json_post = "" |     json_post = "" | ||||||
| @@ -62,7 +62,7 @@ def main(args={}): | |||||||
|             if isinstance(value, dict) and "_links" in value: |             if isinstance(value, dict) and "_links" in value: | ||||||
|                 num_wanlinks = 1 |                 num_wanlinks = 1 | ||||||
|     except urllib.error.HTTPError as error: |     except urllib.error.HTTPError as error: | ||||||
|         print("Error code "+error.code) |         print("Error code %s" % error.code) | ||||||
|  |  | ||||||
|         lf_r = LFRequest.LFRequest(base_url+"/cli-json/rm_endp") |         lf_r = LFRequest.LFRequest(base_url+"/cli-json/rm_endp") | ||||||
|         lf_r.addPostData({ |         lf_r.addPostData({ | ||||||
| @@ -162,7 +162,7 @@ def main(args={}): | |||||||
|             #     print("value not a dict") |             #     print("value not a dict") | ||||||
|  |  | ||||||
|         except urllib.error.HTTPError as error: |         except urllib.error.HTTPError as error: | ||||||
|             print("Error code "+error.code) |             print("Error code %s " % error.code) | ||||||
|             continue |             continue | ||||||
|  |  | ||||||
|     # print("starting wanlink:") |     # print("starting wanlink:") | ||||||
| @@ -192,7 +192,7 @@ def main(args={}): | |||||||
|                                 running = 1 |                                 running = 1 | ||||||
|  |  | ||||||
|         except urllib.error.HTTPError as error: |         except urllib.error.HTTPError as error: | ||||||
|             print("Error code "+error.code) |             print("Error code %s" % error.code) | ||||||
|             continue |             continue | ||||||
|  |  | ||||||
|     print("Wanlink is running") |     print("Wanlink is running") | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Matthew Stidham
					Matthew Stidham