summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2014-04-06 17:30:52 +0200
committermathieui <mathieui@mathieui.net>2014-04-06 17:30:52 +0200
commit218c71dfbfb9f564eb1ec2a966df24eef2efbdec (patch)
treea068de76a96edc14c10a5f329abb6e979a697bee /src
parente000466ab8950fd91ef3723e60cc9397262ca527 (diff)
downloadpoezio-218c71dfbfb9f564eb1ec2a966df24eef2efbdec.tar.gz
poezio-218c71dfbfb9f564eb1ec2a966df24eef2efbdec.tar.bz2
poezio-218c71dfbfb9f564eb1ec2a966df24eef2efbdec.tar.xz
poezio-218c71dfbfb9f564eb1ec2a966df24eef2efbdec.zip
Do not instantiate the roster at module level
.
Diffstat (limited to 'src')
-rw-r--r--src/poezio.py3
-rw-r--r--src/roster.py7
2 files changed, 9 insertions, 1 deletions
diff --git a/src/poezio.py b/src/poezio.py
index 219a2279..f9d27a51 100644
--- a/src/poezio.py
+++ b/src/poezio.py
@@ -36,6 +36,9 @@ def main():
import logger
logger.create_logger()
+ import roster
+ roster.create_roster()
+
import core
log = logging.getLogger('')
diff --git a/src/roster.py b/src/roster.py
index 51468aad..b306bd07 100644
--- a/src/roster.py
+++ b/src/roster.py
@@ -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