[CalendarServer-changes] [12394] twext/trunk/twext/who

source_changes at macosforge.org source_changes at macosforge.org
Wed Mar 12 11:22:20 PDT 2014


Revision: 12394
          http://trac.calendarserver.org//changeset/12394
Author:   wsanchez at apple.com
Date:     2014-01-18 11:48:47 -0800 (Sat, 18 Jan 2014)
Log Message:
-----------
AttributeError, not AssertionError, when setting a read-only attribute.

Modified Paths:
--------------
    twext/trunk/twext/who/test/test_xml.py
    twext/trunk/twext/who/xml.py

Modified: twext/trunk/twext/who/test/test_xml.py
===================================================================
--- twext/trunk/twext/who/test/test_xml.py	2014-01-18 19:44:32 UTC (rev 12393)
+++ twext/trunk/twext/who/test/test_xml.py	2014-01-18 19:48:47 UTC (rev 12394)
@@ -189,7 +189,7 @@
             service = self.service()
             service.realmName = u"foo"
 
-        self.assertRaises(AssertionError, setRealmName)
+        self.assertRaises(AttributeError, setRealmName)
 
 
 

Modified: twext/trunk/twext/who/xml.py
===================================================================
--- twext/trunk/twext/who/xml.py	2014-01-18 19:44:32 UTC (rev 12393)
+++ twext/trunk/twext/who/xml.py	2014-01-18 19:48:47 UTC (rev 12394)
@@ -169,7 +169,7 @@
     @realmName.setter
     def realmName(self, value):
         if value is not noRealmName:
-            raise AssertionError("realmName may not be set directly")
+            raise AttributeError("realmName may not be set directly")
 
 
     @property
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140312/63bfbf31/attachment.html>


More information about the calendarserver-changes mailing list