]> git.llucax.com Git - software/pymin.git/blobdiff - pymin/services/ppp/__init__.py
Bugfix: _dict_* should be _cont_* and _persistent_attrs should be a list.
[software/pymin.git] / pymin / services / ppp / __init__.py
index 028eb912c316f95d22514192cdd963dfcd4e4f07..c759bc72338321f55c1ea1e7195f1d6b2602419a 100644 (file)
@@ -7,20 +7,9 @@ from pymin.dispatcher import Handler, handler, HandlerError
 from pymin.services.util import Restorable, ConfigWriter \
                                 ,TransactionalHandler, DictSubHandler, call
 
-__ALL__ = ('PppHandler')
+__ALL__ = ('PppHandler',)
 
-class Error(HandlerError):
-    r"""
-    Error(command) -> Error instance :: Base ConnectionHandler exception class.
-
-    All exceptions raised by the ConnectionHandler inherits from this one, so you can
-    easily catch any ConnectionHandler exception.
-
-    message - A descriptive error message.
-    """
-    pass
-
-class ConnectionError(Error, KeyError):
+class ConnectionError(HandlerError, KeyError):
     r"""
     ConnectionError(hostname) -> ConnectionError instance
 
@@ -78,14 +67,14 @@ class ConnectionHandler(DictSubHandler):
 
     handler_help = u"Manages connections for the ppp service"
 
-    _dict_subhandler_attr = 'conns'
-    _dict_subhandler_class = Connection
+    _cont_subhandler_attr = 'conns'
+    _cont_subhandler_class = Connection
 
 class PppHandler(Restorable, ConfigWriter, TransactionalHandler):
 
     handler_help = u"Manage ppp service"
 
-    _persistent_attrs = ('conns')
+    _persistent_attrs = ['conns']
 
     _restorable_defaults = dict(
         conns  = dict(),
@@ -154,4 +143,4 @@ if __name__ == '__main__':
     p.conn.add('ppptunnel_c','dominio\luca','luca',type='TUNNEL',server='192.168.0.23')
     p.commit()
     print p.conn.list()
-    print p.conn.show()
\ No newline at end of file
+    print p.conn.show()