changeset 281:30895c49ebd2

fixes the imports from sat.tmp
author souliane <souliane@mailoo.org>
date Wed, 14 Jan 2015 10:43:27 +0100
parents 798cb8962c0b
children 7d54ff2eeaf2
files sat_pubsub/__init__.py sat_pubsub/mam.py sat_pubsub/tap.py
diffstat 3 files changed, 14 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/sat_pubsub/__init__.py	Fri Jan 09 10:57:10 2015 +0100
+++ b/sat_pubsub/__init__.py	Wed Jan 14 10:43:27 2015 +0100
@@ -58,10 +58,10 @@
 
 __version__ = '0.1.0D'
 
-
+# TODO: remove this when RSM and MAM are in wokkel
 import wokkel
-from sat.tmp.wokkel import delay, pubsub, rsm
-
-wokkel.delay = delay
-wokkel.pubsub = pubsub
-wokkel.rsm = rsm
+from sat.tmp.wokkel import delay as tmp_delay, pubsub as tmp_pubsub, rsm as tmp_rsm, mam as tmp_mam
+wokkel.delay = tmp_delay
+wokkel.pubsub = tmp_pubsub
+wokkel.rsm = tmp_rsm
+wokkel.mam = tmp_mam
--- a/sat_pubsub/mam.py	Fri Jan 09 10:57:10 2015 +0100
+++ b/sat_pubsub/mam.py	Wed Jan 14 10:43:27 2015 +0100
@@ -9,8 +9,10 @@
 """
 
 from zope.interface import implements
-from wokkel.mam import MAMPrefs, IMAMResource
-from wokkel.rsm import RSMResponse
+
+# TODO: change this when RSM and MAM are in wokkel
+from sat.tmp.wokkel.rsm import RSMResponse
+from sat.tmp.wokkel.mam import MAMPrefs, IMAMResource
 
 
 class MAMResource(object):
--- a/sat_pubsub/tap.py	Fri Jan 09 10:57:10 2015 +0100
+++ b/sat_pubsub/tap.py	Wed Jan 14 10:43:27 2015 +0100
@@ -60,9 +60,9 @@
 from wokkel.disco import DiscoHandler
 from wokkel.generic import FallbackHandler, VersionHandler
 from wokkel.iwokkel import IPubSubResource
-from wokkel import pubsub, rsm
+from wokkel import pubsub, rsm, mam as wokkel_mam
 
-from sat_pubsub import __version__, const
+from sat_pubsub import __version__, const, mam
 from sat_pubsub.backend import BackendService
 from sat_pubsub.remote_roster import RosterClient
 
@@ -151,8 +151,8 @@
     bs.roster = rc
 
     if const.FLAG_ENABLE_MAM:
-        mam_resource = MAMResource()
-        mam_s = mam.MAMService(mam_resource)
+        mam_resource = mam.MAMResource()
+        mam_s = wokkel_mam.MAMService(mam_resource)
         mam_s.setHandlerParent(cs)
 
     return s