Commit 218c71df authored by mathieui's avatar mathieui

Do not instantiate the roster at module level

.
parent e000466a
......@@ -36,6 +36,9 @@ def main():
import logger
logger.create_logger()
import roster
roster.create_roster()
import core
log = logging.getLogger('')
......
......@@ -327,5 +327,10 @@ class RosterGroup(object):
"""Return the number of connected contacts"""
return len([1 for contact in self.contacts if len(contact)])
def create_roster():
"Create the global roster object"
global roster
roster = Roster()
# Shared roster object
roster = Roster()
roster = None
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment