applied the except and raise fixers to the master branch to close the gap with py3
[nepi.git] / src / nepi / resources / omf / interface.py
index aa4d5bc..e776785 100644 (file)
@@ -228,7 +228,7 @@ class OMFWifiInterface(OMFResource):
         if not self.get('xmppServer'):
             msg = "XmppServer is not initialzed. XMPP Connections impossible"
             self.error(msg)
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
 
         if not (self.get('xmppUser') or self.get('xmppPort') 
                    or self.get('xmppPassword')):
@@ -243,13 +243,13 @@ class OMFWifiInterface(OMFResource):
         if not (self.get('name')):
             msg = "Interface's name is not initialized"
             self.error(msg)
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
 
         if not (self.get('mode') and self.get('essid') \
                  and self.get('hw_mode') and self.get('ip')):
             msg = "Interface's variable are not initialized"
             self.error(msg)
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
 
         if self.get('version') == "5":
             res = self.configure_on_omf5()        
@@ -285,7 +285,7 @@ class OMFWifiInterface(OMFResource):
         if self._create_cnt > confirmation_counter:
             msg = "Couldn't retrieve the confirmation of the creation"
             self.error(msg)
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
 
         uid = self.check_deploy(self.create_id)
         if not uid: