Update of /cvsroot/freevo/freevo/src
In directory sc8-pr-cvs1:/tmp/cvs-serv9591

Modified Files:
        plugin.py 
Log Message:
if plugins do not call __init__ they want to be disabled

Index: plugin.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/plugin.py,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** plugin.py   10 Sep 2003 18:13:48 -0000      1.39
--- plugin.py   10 Sep 2003 19:29:29 -0000      1.40
***************
*** 10,13 ****
--- 10,16 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.40  2003/09/10 19:29:29  dischi
+ # if plugins do not call __init__ they want to be disabled
+ #
  # Revision 1.39  2003/09/10 18:13:48  dischi
  # support for plugins to add defaults to config
***************
*** 411,414 ****
--- 414,426 ----
              p = eval('%s()' % object)
  
+         if not hasattr(p, '_type'):
+             if hasattr(p, 'reason'):
+                 reason = p.reason
+             else:
+                 reason = 'unknown\nThe plugin neither called __init__ nor set a'\
+                          'reason why\nPlease contact the plugin author or the freevo 
list'
+             print 'plugin %s deactivated, reason: %s' % (name, reason)
+             return
+         
          p._number = number
          p._level = level




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to