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