Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eugene Shen
erp5
Commits
723fcb24
Commit
723fcb24
authored
Nov 16, 2016
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compatibility with recent BTrees
Same as for commit
c3450f14
: BTrees don't accept None as key anymore.
parent
839a2744
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
product/ERP5/Tool/PasswordTool.py
product/ERP5/Tool/PasswordTool.py
+1
-1
product/ERP5/Tool/UrlRegistryTool.py
product/ERP5/Tool/UrlRegistryTool.py
+6
-0
No files found.
product/ERP5/Tool/PasswordTool.py
View file @
723fcb24
...
@@ -266,7 +266,7 @@ class PasswordTool(BaseTool):
...
@@ -266,7 +266,7 @@ class PasswordTool(BaseTool):
try
:
try
:
register_user_login
,
expiration_date
=
self
.
_password_request_dict
[
register_user_login
,
expiration_date
=
self
.
_password_request_dict
[
password_key
]
password_key
]
except
KeyError
:
except
(
KeyError
,
TypeError
)
:
# XXX: incorrect grammar and not descriptive enough
# XXX: incorrect grammar and not descriptive enough
return
error
(
'Key not known. Please ask reset password.'
)
return
error
(
'Key not known. Please ask reset password.'
)
if
user_login
is
not
None
and
register_user_login
!=
user_login
:
if
user_login
is
not
None
and
register_user_login
!=
user_login
:
...
...
product/ERP5/Tool/UrlRegistryTool.py
View file @
723fcb24
...
@@ -209,18 +209,24 @@ class BTreeMappingDict(Implicit):
...
@@ -209,18 +209,24 @@ class BTreeMappingDict(Implicit):
return
self
.
_getStorage
().
items
()
return
self
.
_getStorage
().
items
()
def
__getitem__
(
self
,
key
):
def
__getitem__
(
self
,
key
):
if
key
is
None
:
raise
KeyError
(
key
)
return
self
.
_getStorage
()[
key
]
return
self
.
_getStorage
()[
key
]
def
__contains__
(
self
,
key
):
def
__contains__
(
self
,
key
):
return
key
in
self
.
_getStorage
().
keys
()
return
key
in
self
.
_getStorage
().
keys
()
def
get
(
self
,
key
,
default
=
None
):
def
get
(
self
,
key
,
default
=
None
):
if
key
is
None
:
return
default
return
self
.
_getStorage
().
get
(
key
,
default
)
return
self
.
_getStorage
().
get
(
key
,
default
)
def
__setitem__
(
self
,
key
,
value
):
def
__setitem__
(
self
,
key
,
value
):
self
.
_getStorage
()[
key
]
=
value
self
.
_getStorage
()[
key
]
=
value
def
__delitem__
(
self
,
key
):
def
__delitem__
(
self
,
key
):
if
key
is
None
:
raise
KeyError
(
key
)
del
self
.
_getStorage
()[
key
]
del
self
.
_getStorage
()[
key
]
InitializeClass
(
UrlRegistryTool
)
InitializeClass
(
UrlRegistryTool
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment