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
9ca54c6c
Commit
9ca54c6c
authored
Mar 26, 2001
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merged fix for finding SOFTWARE_HOME import files
parent
d80fbe64
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
lib/python/OFS/ObjectManager.py
lib/python/OFS/ObjectManager.py
+12
-6
No files found.
lib/python/OFS/ObjectManager.py
View file @
9ca54c6c
...
...
@@ -84,9 +84,9 @@
##############################################################################
__doc__
=
"""Object Manager
$Id: ObjectManager.py,v 1.12
8 2001/03/01 15:59:59
brian Exp $"""
$Id: ObjectManager.py,v 1.12
9 2001/03/26 19:52:31
brian Exp $"""
__version__
=
'$Revision: 1.12
8
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.12
9
$'
[
11
:
-
2
]
import
App.Management
,
Acquisition
,
Globals
,
CopySupport
,
Products
import
os
,
App
.
FactoryDispatcher
,
ts_regex
,
Products
...
...
@@ -536,9 +536,15 @@ class ObjectManager(
dirname
,
file
=
os
.
path
.
split
(
file
)
if
dirname
:
raise
'Bad Request'
,
'Invalid file name %s'
%
file
for
impath
in
(
INSTANCE_HOME
,
SOFTWARE_HOME
):
file
=
os
.
path
.
join
(
impath
,
'import'
,
file
)
if
os
.
path
.
exists
(
file
):
instance_home
=
INSTANCE_HOME
software_home
=
os
.
path
.
join
(
SOFTWARE_HOME
,
'..%s..'
%
os
.
sep
)
software_home
=
os
.
path
.
normpath
(
software_home
)
for
impath
in
(
instance_home
,
software_home
):
filepath
=
os
.
path
.
join
(
impath
,
'import'
,
file
)
if
os
.
path
.
exists
(
filepath
):
break
else
:
raise
'Bad Request'
,
'File does not exist: %s'
%
file
...
...
@@ -550,7 +556,7 @@ class ObjectManager(
obj
=
obj
.
aq_parent
connection
=
obj
.
_p_jar
ob
=
connection
.
importFile
(
file
,
customImporters
=
customImporters
)
file
path
,
customImporters
=
customImporters
)
if
REQUEST
:
self
.
_verifyObjectPaste
(
ob
,
validate_src
=
0
)
#id=ob.getId()
#can't use above getId() call, it fails on 'old' exported objects
...
...
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