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
3bff875f
Commit
3bff875f
authored
Jun 26, 2000
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merged in Evans product lookup update
parent
21ee43e6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
13 deletions
+14
-13
lib/python/App/Extensions.py
lib/python/App/Extensions.py
+12
-10
lib/python/App/Product.py
lib/python/App/Product.py
+2
-3
No files found.
lib/python/App/Extensions.py
View file @
3bff875f
...
...
@@ -86,11 +86,12 @@ __doc__='''Standard routines for handling extensions.
Extensions currently include external methods and pluggable brains.
$Id: Extensions.py,v 1.1
2 1999/11/08 17:09:27
brian Exp $'''
__version__
=
'$Revision: 1.1
2
$'
[
11
:
-
2
]
$Id: Extensions.py,v 1.1
3 2000/06/26 19:52:46
brian Exp $'''
__version__
=
'$Revision: 1.1
3
$'
[
11
:
-
2
]
from
string
import
find
,
split
import
os
,
zlib
,
rotor
import
Products
path_split
=
os
.
path
.
split
path_join
=
os
.
path
.
join
exists
=
os
.
path
.
exists
...
...
@@ -149,16 +150,17 @@ def getPath(prefix, name, checkProduct=1, suffixes=('',)):
if
d
:
raise
ValueError
,
(
'The file name, %s, should be a simple file name'
%
name
)
sw
=
path_split
(
path_split
(
SOFTWARE_HOME
)[
0
])[
0
]
for
home
in
(
INSTANCE_HOME
,
sw
):
if
checkProduct
:
l
=
find
(
name
,
'.'
)
l
=
find
(
name
,
'.'
)
if
l
>
0
:
p
=
name
[:
l
]
n
=
name
[
l
+
1
:]
r
=
_getPath
(
home
,
"lib/python/Products/%s/%s/"
%
(
p
,
prefix
),
n
,
suffixes
)
p
=
name
[:
l
]
n
=
name
[
l
+
1
:]
for
product_dir
in
Products
.
__path__
:
r
=
_getPath
(
product_dir
,
'%s/%s/'
%
(
p
,
prefix
),
n
,
suffixes
)
if
r
is
not
None
:
return
r
sw
=
path_split
(
path_split
(
SOFTWARE_HOME
)[
0
])[
0
]
for
home
in
(
INSTANCE_HOME
,
sw
):
r
=
_getPath
(
home
,
prefix
,
name
,
suffixes
)
if
r
is
not
None
:
return
r
...
...
lib/python/App/Product.py
View file @
3bff875f
...
...
@@ -307,9 +307,7 @@ class Product(Folder, PermissionManager):
manage_readme
=
Globals
.
HTMLFile
(
'readme'
,
globals
())
def
manage_get_product_readme__
(
self
):
try
:
return
open
(
os
.
path
.
join
(
SOFTWARE_HOME
,
'Products'
,
self
.
id
,
'README.txt'
)).
read
()
return
open
(
os
.
path
.
join
(
self
.
home
,
'README.txt'
)).
read
()
except
:
return
''
def
permissionMappingPossibleValues
(
self
):
...
...
@@ -437,6 +435,7 @@ def initializeProduct(productp, name, home, app):
product
.
manage_options
=
Folder
.
manage_options
product
.
icon
=
'p_/InstalledProduct_icon'
product
.
version
=
fver
product
.
home
=
home
product
.
_distribution
=
None
product
.
manage_distribution
=
None
product
.
thisIsAnInstalledProduct
=
1
...
...
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