Author: dmeyer
Date: Wed Feb 13 13:11:53 2008
New Revision: 3063

Log:
adjust to kaa.notifier decorator name changes

Modified:
   trunk/base/test/decorator.py
   trunk/beacon/src/server/hwmon/cdrom.py
   trunk/epg/src/server.py
   trunk/epg/src/sources/epgdata.py
   trunk/epg/src/sources/schedulesdirect.py
   trunk/epg/src/sources/xmltv.py
   trunk/feedmanager/src/rss.py

Modified: trunk/base/test/decorator.py
==============================================================================
--- trunk/base/test/decorator.py        (original)
+++ trunk/base/test/decorator.py        Wed Feb 13 13:11:53 2008
@@ -1,10 +1,10 @@
-from kaa import execute_in_timer, Timer, OneShotTimer, loop, \
-     is_mainthread, execute_in_thread, execute_in_mainloop
+from kaa import timed, Timer, OneShotTimer, main, \
+     is_mainthread, threaded, MAINTHREAD, POLICY_ONCE, POLICY_RESTART
 
 
 class Foo(object):
 
-    @execute_in_timer(Timer, 0.1, 'once')
+    @timed(0.1, policy=POLICY_ONCE)
     def poll(self, x):
         if not x:
             return False
@@ -12,7 +12,7 @@
         print '1', y
         return True
 
-    @execute_in_timer(Timer, 0.1, 'once')
+    @timed(0.1, policy=POLICY_ONCE)
     def poll2(self, x):
         if not x:
             return False
@@ -20,17 +20,17 @@
         print '2', y
         return True
 
-    @execute_in_thread('name')
+    @threaded('name')
     def foo(self):
         print 'foo is mainthread:', is_mainthread()
         self.bar()
         
-    @execute_in_mainloop()
+    @threaded(MAINTHREAD)
     def bar(self):
         print 'bar is mainthread:', is_mainthread()
         
 
[EMAIL PROTECTED](Timer, 0.1, 'override')
[EMAIL PROTECTED](0.1, policy=POLICY_RESTART)
 def poll(x):
     if not x:
         return False
@@ -39,7 +39,7 @@
     return True
 
 
[EMAIL PROTECTED](OneShotTimer, 0.1)
[EMAIL PROTECTED](0.1, OneShotTimer, policy=POLICY_RESTART)
 def bla(f, msg):
     print msg
     f.foo()
@@ -54,4 +54,4 @@
 bla(f, 'test2')
 OneShotTimer(poll, [20,21,22,23,24]).start(0.3)
 OneShotTimer(f.poll, [30,31,32,33,34]).start(0.3)
-loop()
+main.run()

Modified: trunk/beacon/src/server/hwmon/cdrom.py
==============================================================================
--- trunk/beacon/src/server/hwmon/cdrom.py      (original)
+++ trunk/beacon/src/server/hwmon/cdrom.py      Wed Feb 13 13:11:53 2008
@@ -82,7 +82,7 @@
 
 _rom_drives = []
 
[EMAIL PROTECTED]('beacon.cdrom')
[EMAIL PROTECTED]('beacon.cdrom')
 def eject(device):
     # open fd to the drive
     try:
@@ -174,7 +174,7 @@
         self.disc = None
 
 
-    @kaa.execute_in_thread('beacon.cdrom')
+    @kaa.threaded('beacon.cdrom')
     def check(self):
         log.debug('check drive status %s', self.device)
 

Modified: trunk/epg/src/server.py
==============================================================================
--- trunk/epg/src/server.py     (original)
+++ trunk/epg/src/server.py     Wed Feb 13 13:11:53 2008
@@ -239,7 +239,7 @@
     # functions called by source_* modules
     # -------------------------------------------------------------------------
 
-    @kaa.execute_in_mainloop()
+    @kaa.threaded(kaa.MAINTHREAD)
     def add_channel(self, tuner_id, name, long_name):
         """
         This method requires at least one of tuner_id, name,

Modified: trunk/epg/src/sources/epgdata.py
==============================================================================
--- trunk/epg/src/sources/epgdata.py    (original)
+++ trunk/epg/src/sources/epgdata.py    Wed Feb 13 13:11:53 2008
@@ -207,7 +207,7 @@
         self.add_program(db_id, start, stop, title, **attr)
 
 
[EMAIL PROTECTED]('epg')
[EMAIL PROTECTED]('epg')
 def update(epg):
     """
     Interface to source_epgdata.

Modified: trunk/epg/src/sources/schedulesdirect.py
==============================================================================
--- trunk/epg/src/sources/schedulesdirect.py    (original)
+++ trunk/epg/src/sources/schedulesdirect.py    Wed Feb 13 13:11:53 2008
@@ -301,7 +301,7 @@
             # memory usage considerably).
 
 
[EMAIL PROTECTED]('epg')
[EMAIL PROTECTED]('epg')
 def update(epg, start = None, stop = None):
     from gzip import GzipFile
     from kaa.epg.config import config as epg_config

Modified: trunk/epg/src/sources/xmltv.py
==============================================================================
--- trunk/epg/src/sources/xmltv.py      (original)
+++ trunk/epg/src/sources/xmltv.py      Wed Feb 13 13:11:53 2008
@@ -281,7 +281,7 @@
             self.channels[channel_id][1] = (start, title, attr)
 
 
[EMAIL PROTECTED]('epg')
[EMAIL PROTECTED]('epg')
 def update(epg):
     """
     Interface to source_xmltv.

Modified: trunk/feedmanager/src/rss.py
==============================================================================
--- trunk/feedmanager/src/rss.py        (original)
+++ trunk/feedmanager/src/rss.py        Wed Feb 13 13:11:53 2008
@@ -46,7 +46,7 @@
 log = logging.getLogger('feedmanager')
 isotime = '%a, %d %b %Y %H:%M:%S'
 
[EMAIL PROTECTED]()
[EMAIL PROTECTED]()
 def feedparser(url):
     """
     feedparser.parse wrapper in a thread.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to