3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-25 20:22:45 +01:00

PyLinkNC: don't overwrite sid, serverdata if they're already set

This commit is contained in:
James Lu 2019-02-20 13:21:08 -08:00
parent 24f85acfb8
commit 4f17a7986b

View File

@ -229,7 +229,10 @@ class PyLinkNetworkCore(structures.CamelCaseToSnakeCase):
self.loghandlers = []
self.name = netname
self.conf = conf.conf
if not hasattr(self, 'sid'):
self.sid = None
# serverdata may be overridden as a property on some protocols
if netname in conf.conf['servers'] and not hasattr(self, 'serverdata'):
self.serverdata = conf.conf['servers'][netname]
self.protoname = self.__class__.__module__.split('.')[-1] # Remove leading pylinkirc.protocols.