Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Kirill Smelkov
Zope
Commits
ea10a300
Commit
ea10a300
authored
Mar 07, 2009
by
Stefan H. Holek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract _getImportPaths method.
parent
ca01cd0a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
src/OFS/ObjectManager.py
src/OFS/ObjectManager.py
+7
-4
No files found.
src/OFS/ObjectManager.py
View file @
ea10a300
...
...
@@ -618,7 +618,7 @@ class ObjectManager(CopyContainer,
raise
BadRequest
,
'Invalid file name %s'
%
escape
(
file
)
cfg
=
getConfiguration
()
for
impath
in
(
cfg
.
instancehome
,
getattr
(
cfg
,
'zopehome'
,
''
)
):
for
impath
in
self
.
_getImportPaths
(
):
filepath
=
os
.
path
.
join
(
impath
,
'import'
,
file
)
if
os
.
path
.
exists
(
filepath
):
break
...
...
@@ -655,8 +655,7 @@ class ObjectManager(CopyContainer,
ob
=
self
.
_getOb
(
id
)
ob
.
manage_changeOwnershipType
(
explicit
=
0
)
def
list_imports
(
self
):
listing
=
[]
def
_getImportPaths
(
self
):
cfg
=
getConfiguration
()
paths
=
[]
zopehome
=
getattr
(
cfg
,
'zopehome'
,
None
)
...
...
@@ -664,7 +663,11 @@ class ObjectManager(CopyContainer,
paths
.
append
(
zopehome
)
if
not
cfg
.
instancehome
in
paths
:
paths
.
append
(
cfg
.
instancehome
)
for
impath
in
paths
:
return
paths
def
list_imports
(
self
):
listing
=
[]
for
impath
in
self
.
_getImportPaths
():
directory
=
os
.
path
.
join
(
impath
,
'import'
)
if
not
os
.
path
.
isdir
(
directory
):
continue
...
...
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