use templte on resource only if a resource is set. fix a TB
This commit is contained in:
parent
c9f9c12c2c
commit
6ffe910185
|
@ -78,9 +78,10 @@ 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.
|
||||
self.server_resource = Template(self.server_resource).safe_substitute({
|
||||
'hostname': socket.gethostname()
|
||||
})
|
||||
if self.server_resource:
|
||||
self.server_resource = Template(self.server_resource).safe_substitute({
|
||||
'hostname': socket.gethostname()
|
||||
})
|
||||
if gajim.config.get_per('accounts', self.name, 'keep_alives_enabled'):
|
||||
self.keepalives = gajim.config.get_per('accounts', self.name,'keep_alive_every_foo_secs')
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue