Commit 4cee6217 authored by Jérome Perrin's avatar Jérome Perrin

this is more a ValueError than a TypeError


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35157 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7a91f0b8
...@@ -303,7 +303,7 @@ class PreferenceTool(BaseTool): ...@@ -303,7 +303,7 @@ class PreferenceTool(BaseTool):
user_folder = self.getPortalObject().acl_users user_folder = self.getPortalObject().acl_users
user = user_folder.getUserById(username) user = user_folder.getUserById(username)
if user is None: if user is None:
raise TypeError("User %r not found" % (username, )) raise ValueError("User %r not found" % (username, ))
newSecurityManager(None, user.__of__(user_folder)) newSecurityManager(None, user.__of__(user_folder))
return self.newContent(portal_type='Preference') return self.newContent(portal_type='Preference')
finally: finally:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment