samba python tests: convert 'except X, e' to 'except X as e'
[samba.git] / python / samba / tests / auth_log_pass_change.py
index a6850374547f3ae6e42b40272360f86512c7acc9..8ed92814960b0a1c3b4c2ca9cf58f1d6903817eb 100644 (file)
@@ -142,7 +142,7 @@ class AuthLogPassChangeTests(samba.tests.auth_log_base.AuthLogTestBase):
             net.change_password(newpassword=password.encode('utf-8'),
                                 oldpassword=USER_PASS,
                                 username=USER_NAME)
-        except Exception, msg:
+        except Exception as msg:
             exception_thrown = True
         self.assertEquals(True, exception_thrown,
                           "Expected exception not thrown")
@@ -173,7 +173,7 @@ class AuthLogPassChangeTests(samba.tests.auth_log_base.AuthLogTestBase):
             net.change_password(newpassword=password.encode('utf-8'),
                                 oldpassword=USER_PASS,
                                 username="badUser")
-        except Exception, msg:
+        except Exception as msg:
             exception_thrown = True
         self.assertEquals(True, exception_thrown,
                           "Expected exception not thrown")
@@ -204,7 +204,7 @@ class AuthLogPassChangeTests(samba.tests.auth_log_base.AuthLogTestBase):
             net.change_password(newpassword=password.encode('utf-8'),
                                 oldpassword="badPassword",
                                 username=USER_NAME)
-        except Exception, msg:
+        except Exception as msg:
             exception_thrown = True
         self.assertEquals(True, exception_thrown,
                           "Expected exception not thrown")