Kaynağa Gözat

Callback: remove obsolete exception

mask from testing
oz123 11 yıl önce
ebeveyn
işleme
896c10e866
1 değiştirilmiş dosya ile 10 ekleme ve 15 silme
  1. 10 15
      pwman/util/callback.py

+ 10 - 15
pwman/util/callback.py

@@ -1,15 +1,15 @@
 #============================================================================
 #============================================================================
 # This file is part of Pwman3.
 # This file is part of Pwman3.
-# 
+#
 # Pwman3 is free software; you can redistribute it and/or modify
 # Pwman3 is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License, version 2
 # it under the terms of the GNU General Public License, version 2
-# as published by the Free Software Foundation; 
-# 
+# as published by the Free Software Foundation;
+#
 # Pwman3 is distributed in the hope that it will be useful,
 # Pwman3 is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # You should have received a copy of the GNU General Public License
 # along with Pwman3; if not, write to the Free Software
 # along with Pwman3; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
@@ -20,16 +20,19 @@
 # Copyright (C) 2006 Ivan Kelly <ivan@ivankelly.net>
 # Copyright (C) 2006 Ivan Kelly <ivan@ivankelly.net>
 #============================================================================
 #============================================================================
 
 
-"""Callback interface
+"""
+Callback interface
 To be used when UI needs to be back to get info from user.
 To be used when UI needs to be back to get info from user.
 """
 """
 
 
-class Callback:
+
+# this class is just a base class no real method to test
+class Callback(object):  # pragma: no cover
     """Callback interface. Callback classes must implement this."""
     """Callback interface. Callback classes must implement this."""
     def getinput(self, question):
     def getinput(self, question):
         """Return text"""
         """Return text"""
         pass
         pass
-    
+
     def getsecret(self, question):
     def getsecret(self, question):
         """Return key"""
         """Return key"""
         pass
         pass
@@ -45,11 +48,3 @@ class Callback:
     def notice(self, warning):
     def notice(self, warning):
         """Present notice to user"""
         """Present notice to user"""
         pass
         pass
-
-
-class CallbackCancelException(Exception):
-    def __init__(self, message):
-        self.message = message
-    def __str__(self):
-        return "CallbackCancelException: %s" % (self.message)
-