mirror of https://github.com/fail2ban/fail2ban
				
				
				
			BF: fail2ban-client processCmd ret was being overwritten each loop
							parent
							
								
									1e9910fcb0
								
							
						
					
					
						commit
						9bfc77c320
					
				| 
						 | 
				
			
			@ -145,7 +145,7 @@ class Fail2banClient:
 | 
			
		|||
 | 
			
		||||
	def __processCmd(self, cmd, showRet = True):
 | 
			
		||||
		beautifier = Beautifier()
 | 
			
		||||
		ret = True
 | 
			
		||||
		streamRet = True
 | 
			
		||||
		for c in cmd:
 | 
			
		||||
			beautifier.setInputCmd(c)
 | 
			
		||||
			try:
 | 
			
		||||
| 
						 | 
				
			
			@ -159,7 +159,7 @@ class Fail2banClient:
 | 
			
		|||
					logSys.error("NOK: " + `ret[1].args`)
 | 
			
		||||
					if showRet:
 | 
			
		||||
						print beautifier.beautifyError(ret[1])
 | 
			
		||||
					ret = False
 | 
			
		||||
					streamRet = False
 | 
			
		||||
			except socket.error:
 | 
			
		||||
				if showRet:
 | 
			
		||||
					logSys.error("Unable to contact server. Is it running?")
 | 
			
		||||
| 
						 | 
				
			
			@ -168,7 +168,7 @@ class Fail2banClient:
 | 
			
		|||
				if showRet:
 | 
			
		||||
					logSys.error(e)
 | 
			
		||||
				return False
 | 
			
		||||
		return ret
 | 
			
		||||
		return streamRet
 | 
			
		||||
 | 
			
		||||
	##
 | 
			
		||||
	# Process a command line.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue