E5Gui/E5Application.py

changeset 410
e5d1addeb90c
parent 55
b5c84934de9c
child 791
9ec2ac20e54e
--- a/E5Gui/E5Application.py	Mon Jul 26 19:59:27 2010 +0200
+++ b/E5Gui/E5Application.py	Tue Jul 27 08:25:53 2010 +0200
@@ -34,7 +34,7 @@
         @exception KeyError raised when the given name is already in use
         """
         if name in self.__objectRegistry:
-            raise KeyError('Object "%s" already registered.' % name)
+            raise KeyError('Object "{0}" already registered.'.format(name))
         else:
             self.__objectRegistry[name] = object
         
@@ -49,7 +49,7 @@
         if name in self.__objectRegistry:
             return self.__objectRegistry[name]
         else:
-            raise KeyError('Object "%s" is not registered.' % name)
+            raise KeyError('Object "{0}" is not registered.'.format(name))
         
     def registerPluginObject(self, name, object, pluginType = None):
         """
@@ -61,7 +61,7 @@
         @exception KeyError raised when the given name is already in use
         """
         if name in self.__pluginObjectRegistry:
-            raise KeyError('Pluginobject "%s" already registered.' % name)
+            raise KeyError('Pluginobject "{0}" already registered.'.format(name))
         else:
             self.__pluginObjectRegistry[name] = (object, pluginType)
         
@@ -85,7 +85,7 @@
         if name in self.__pluginObjectRegistry:
             return self.__pluginObjectRegistry[name][0]
         else:
-            raise KeyError('Pluginobject "%s" is not registered.' % name)
+            raise KeyError('Pluginobject "{0}" is not registered.'.format(name))
         
     def getPluginObjects(self):
         """
@@ -110,6 +110,6 @@
         if name in self.__pluginObjectRegistry:
             return self.__pluginObjectRegistry[name][1]
         else:
-            raise KeyError('Pluginobject "%s" is not registered.' % name)
+            raise KeyError('Pluginobject "{0}" is not registered.'.format(name))
 
-e5App = QCoreApplication.instance
\ No newline at end of file
+e5App = QCoreApplication.instance

eric ide

mercurial