Merge release-0.28.17 from 'tools/mic'
[platform/upstream/mic.git] / mic / 3rdparty / pykickstart / base.py
index e3597df..75ce249 100644 (file)
@@ -79,7 +79,7 @@ class KickstartCommand(KickstartObject):
 
         # We don't want people using this class by itself.
         if self.__class__ is KickstartCommand:
-            raise TypeError, "KickstartCommand is an abstract class."
+            raise TypeError ("KickstartCommand is an abstract class.")
 
         KickstartObject.__init__(self, *args, **kwargs)
 
@@ -122,7 +122,7 @@ class KickstartCommand(KickstartObject):
         """Parse the list of args and set data on the KickstartCommand object.
            This method must be provided by all subclasses.
         """
-        raise TypeError, "parse() not implemented for KickstartCommand"
+        raise TypeError ("parse() not implemented for KickstartCommand")
 
     def apply(self, instroot="/"):
         """Write out the configuration related to the KickstartCommand object.
@@ -171,7 +171,7 @@ class DeprecatedCommand(KickstartCommand):
     def __init__(self, writePriority=None, *args, **kwargs):
         # We don't want people using this class by itself.
         if self.__class__ is KickstartCommand:
-            raise TypeError, "DeprecatedCommand is an abstract class."
+            raise TypeError ("DeprecatedCommand is an abstract class.")
 
         # Create a new DeprecatedCommand instance.
         KickstartCommand.__init__(self, writePriority, *args, **kwargs)
@@ -245,7 +245,7 @@ class BaseHandler(KickstartObject):
 
         # We don't want people using this class by itself.
         if self.__class__ is BaseHandler:
-            raise TypeError, "BaseHandler is an abstract class."
+            raise TypeError ("BaseHandler is an abstract class.")
 
         KickstartObject.__init__(self, *args, **kwargs)
 
@@ -388,7 +388,7 @@ class BaseHandler(KickstartObject):
         cmd = args[0]
 
         if not self.commands.has_key(cmd):
-            raise KickstartParseError, formatErrorMsg(lineno, msg=_("Unknown command: %s" % cmd))
+            raise KickstartParseError (formatErrorMsg(lineno, msg=_("Unknown command: %s" % cmd)))
         elif self.commands[cmd] != None:
             self.commands[cmd].currentCmd = cmd
             self.commands[cmd].currentLine = self.currentLine
@@ -429,13 +429,13 @@ class BaseData(KickstartObject):
 
     def __init__(self, *args, **kwargs):
         """Create a new BaseData instance.
-        
-           lineno -- Line number in the ks-file where this object was defined
+
+        lineno -- Line number in the ks-file where this object was defined
         """
 
         # We don't want people using this class by itself.
         if self.__class__ is BaseData:
-            raise TypeError, "BaseData is an abstract class."
+            raise TypeError ("BaseData is an abstract class.")
 
         KickstartObject.__init__(self, *args, **kwargs)
         self.lineno = 0