mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-11-03 20:27:54 +00:00 
			
		
		
		
	sta_connect.py: adds gaurd
This commit is contained in:
		@@ -69,6 +69,9 @@ class StaConnect(LFCliBase):
 | 
				
			|||||||
    def run(self):
 | 
					    def run(self):
 | 
				
			||||||
        self.checkConnect()
 | 
					        self.checkConnect()
 | 
				
			||||||
        eth1IP = self.jsonGet(self.getUpstreamUrl())
 | 
					        eth1IP = self.jsonGet(self.getUpstreamUrl())
 | 
				
			||||||
 | 
					        if eth1IP is None:
 | 
				
			||||||
 | 
					            print("Unable to query "+self.upstream_port+", bye")
 | 
				
			||||||
 | 
					            sys.exit(1)
 | 
				
			||||||
        if eth1IP['interface']['ip'] == "0.0.0.0":
 | 
					        if eth1IP['interface']['ip'] == "0.0.0.0":
 | 
				
			||||||
            print(f"Warning: {self.getUpstreamUrl()} lacks ip address")
 | 
					            print(f"Warning: {self.getUpstreamUrl()} lacks ip address")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user