use templte on resource only if a resource is set. fix a TB
This commit is contained in:
		
							parent
							
								
									c9f9c12c2c
								
							
						
					
					
						commit
						6ffe910185
					
				
					 1 changed files with 4 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -78,6 +78,7 @@ class Connection(ConnectionHandlers):
 | 
			
		|||
		self.password = passwords.get_password(name)
 | 
			
		||||
		self.server_resource = gajim.config.get_per('accounts', name, 'resource')
 | 
			
		||||
		# All valid resource substitution strings should be added to this hash. 
 | 
			
		||||
		if self.server_resource:
 | 
			
		||||
			self.server_resource = Template(self.server_resource).safe_substitute({
 | 
			
		||||
				'hostname': socket.gethostname()
 | 
			
		||||
			})
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue