Ver código fonte

replace call to init with super

oz123 10 anos atrás
pai
commit
dee525a248
1 arquivos alterados com 3 adições e 2 exclusões
  1. 3 2
      pwman/ui/cli.py

+ 3 - 2
pwman/ui/cli.py

@@ -40,12 +40,13 @@ class PwmanCliNew(cmd.Cmd, Aliases, BaseCommands):
     """
     Inherit from the BaseCommands and Aliases
     """
-    def __init__(self, db, hasxsel, callback, config_parser):
+    def __init__(self, db, hasxsel, callback, config_parser, **kwargs):
         """
         initialize CLI interface, set up the DB
         connecion, see if we have xsel ...
         """
-        cmd.Cmd.__init__(self)
+        super(PwmanCliNew, self).__init__(**kwargs)
+
         self.intro = "%s %s (c) visit: %s" % (pwman.appname, pwman.version,
                                               pwman.website)
         self._historyfile = config_parser.get_value("Readline", "history")