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
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Roque
erp5
Commits
a26ce865
Commit
a26ce865
authored
Aug 08, 2013
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove useless except block and use with statement for lock instead try/finally block.
parent
7874888a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
8 deletions
+1
-8
product/ERP5Type/dynamic/lazy_class.py
product/ERP5Type/dynamic/lazy_class.py
+1
-8
No files found.
product/ERP5Type/dynamic/lazy_class.py
View file @
a26ce865
...
...
@@ -320,8 +320,7 @@ class PortalTypeMetaClass(GhostBaseMetaClass, PropertyHolder):
portal_type
=
klass
.
__name__
from
Products.ERP5.ERP5Site
import
getSite
site
=
getSite
()
aq_method_lock
.
acquire
()
try
:
with
aq_method_lock
:
try
:
class_definition
=
generatePortalTypeClass
(
site
,
portal_type
)
except
AttributeError
:
...
...
@@ -360,12 +359,6 @@ class PortalTypeMetaClass(GhostBaseMetaClass, PropertyHolder):
# need to set %s__roles__ for generated methods
cls
.
setupSecurity
()
except
Exception
:
import
traceback
;
traceback
.
print_exc
()
raise
finally
:
aq_method_lock
.
release
()
def
generateLazyPortalTypeClass
(
portal_type_name
):
return
PortalTypeMetaClass
(
portal_type_name
,
(
InitGhostBase
,),
...
...
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