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
2e062e44
Commit
2e062e44
authored
Jan 08, 2006
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zLOG -> logging
parent
59a14865
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
17 deletions
+11
-17
lib/python/Products/PageTemplates/PageTemplateFile.py
lib/python/Products/PageTemplates/PageTemplateFile.py
+5
-3
lib/python/Products/PageTemplates/ZopePageTemplate.py
lib/python/Products/PageTemplates/ZopePageTemplate.py
+1
-9
lib/python/Products/Sessions/SessionDataManager.py
lib/python/Products/Sessions/SessionDataManager.py
+5
-5
No files found.
lib/python/Products/PageTemplates/PageTemplateFile.py
View file @
2e062e44
...
@@ -18,8 +18,8 @@ Zope object encapsulating a Page Template from the filesystem.
...
@@ -18,8 +18,8 @@ Zope object encapsulating a Page Template from the filesystem.
__version__
=
'$Revision: 1.30 $'
[
11
:
-
2
]
__version__
=
'$Revision: 1.30 $'
[
11
:
-
2
]
import
os
,
AccessControl
import
os
,
AccessControl
from
logging
import
getLogger
from
Globals
import
package_home
,
DevelopmentMode
from
Globals
import
package_home
,
DevelopmentMode
from
zLOG
import
LOG
,
ERROR
from
Shared.DC.Scripts.Script
import
Script
from
Shared.DC.Scripts.Script
import
Script
from
Shared.DC.Scripts.Signature
import
FuncCode
from
Shared.DC.Scripts.Signature
import
FuncCode
from
AccessControl
import
getSecurityManager
from
AccessControl
import
getSecurityManager
...
@@ -31,6 +31,9 @@ from Acquisition import aq_parent, aq_inner
...
@@ -31,6 +31,9 @@ from Acquisition import aq_parent, aq_inner
from
App.config
import
getConfiguration
from
App.config
import
getConfiguration
from
OFS.SimpleItem
import
Item_w__name__
from
OFS.SimpleItem
import
Item_w__name__
LOG
=
getLogger
(
'PageTemplateFile'
)
class
PageTemplateFile
(
Item_w__name__
,
Script
,
PageTemplate
,
Traversable
):
class
PageTemplateFile
(
Item_w__name__
,
Script
,
PageTemplate
,
Traversable
):
"Zope wrapper for filesystem Page Template using TAL, TALES, and METAL"
"Zope wrapper for filesystem Page Template using TAL, TALES, and METAL"
...
@@ -146,8 +149,7 @@ class PageTemplateFile(Item_w__name__, Script, PageTemplate, Traversable):
...
@@ -146,8 +149,7 @@ class PageTemplateFile(Item_w__name__, Script, PageTemplate, Traversable):
self
.
pt_edit
(
text
,
t
)
self
.
pt_edit
(
text
,
t
)
self
.
_cook
()
self
.
_cook
()
if
self
.
_v_errors
:
if
self
.
_v_errors
:
LOG
(
'PageTemplateFile'
,
ERROR
,
'Error in template'
,
LOG
.
error
(
'Error in template %s'
%
'
\
n
'
.
join
(
self
.
_v_errors
))
'
\
n
'
.
join
(
self
.
_v_errors
))
return
return
self
.
_v_last_read
=
mtime
self
.
_v_last_read
=
mtime
...
...
lib/python/Products/PageTemplates/ZopePageTemplate.py
View file @
2e062e44
...
@@ -20,7 +20,6 @@ __version__='$Revision: 1.48 $'[11:-2]
...
@@ -20,7 +20,6 @@ __version__='$Revision: 1.48 $'[11:-2]
import
os
,
AccessControl
,
Acquisition
,
sys
,
types
import
os
,
AccessControl
,
Acquisition
,
sys
,
types
from
types
import
StringType
from
types
import
StringType
from
Globals
import
DTMLFile
,
ImageFile
,
MessageDialog
,
package_home
from
Globals
import
DTMLFile
,
ImageFile
,
MessageDialog
,
package_home
from
zLOG
import
LOG
,
ERROR
,
INFO
from
OFS.SimpleItem
import
SimpleItem
from
OFS.SimpleItem
import
SimpleItem
from
DateTime.DateTime
import
DateTime
from
DateTime.DateTime
import
DateTime
from
Shared.DC.Scripts.Script
import
Script
,
BindingsUI
from
Shared.DC.Scripts.Script
import
Script
,
BindingsUI
...
@@ -38,14 +37,7 @@ from PageTemplate import PageTemplate
...
@@ -38,14 +37,7 @@ from PageTemplate import PageTemplate
from
Expressions
import
SecureModuleImporter
from
Expressions
import
SecureModuleImporter
from
PageTemplateFile
import
PageTemplateFile
from
PageTemplateFile
import
PageTemplateFile
try
:
SUPPORTS_WEBDAV_LOCKS
=
1
from
webdav.Lockable
import
ResourceLockedError
from
webdav.WriteLockInterface
import
WriteLockInterface
SUPPORTS_WEBDAV_LOCKS
=
1
except
ImportError
:
SUPPORTS_WEBDAV_LOCKS
=
0
class
Src
(
Acquisition
.
Explicit
):
class
Src
(
Acquisition
.
Explicit
):
" "
" "
...
...
lib/python/Products/Sessions/SessionDataManager.py
View file @
2e062e44
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
############################################################################
############################################################################
import
re
,
time
,
sys
import
re
,
time
,
sys
from
logging
import
getLogger
import
Globals
import
Globals
from
OFS.SimpleItem
import
Item
from
OFS.SimpleItem
import
Item
from
Acquisition
import
Implicit
,
Explicit
,
aq_base
from
Acquisition
import
Implicit
,
Explicit
,
aq_base
...
@@ -19,7 +20,6 @@ from Persistence import Persistent
...
@@ -19,7 +20,6 @@ from Persistence import Persistent
from
AccessControl.Owned
import
Owned
from
AccessControl.Owned
import
Owned
from
AccessControl.Role
import
RoleManager
from
AccessControl.Role
import
RoleManager
from
App.Management
import
Tabs
from
App.Management
import
Tabs
from
zLOG
import
LOG
,
WARNING
,
BLATHER
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
import
SessionInterfaces
import
SessionInterfaces
from
SessionPermissions
import
*
from
SessionPermissions
import
*
...
@@ -30,6 +30,7 @@ from ZPublisher.BeforeTraverse import registerBeforeTraverse, \
...
@@ -30,6 +30,7 @@ from ZPublisher.BeforeTraverse import registerBeforeTraverse, \
unregisterBeforeTraverse
unregisterBeforeTraverse
bad_path_chars_in
=
re
.
compile
(
'[^a-zA-Z0-9-_~
\
,
\
.
\
/]
'
).search
bad_path_chars_in
=
re
.
compile
(
'[^a-zA-Z0-9-_~
\
,
\
.
\
/]
'
).search
LOG = getLogger('
SessionDataManager
')
class SessionDataManagerErr(Exception): pass
class SessionDataManagerErr(Exception): pass
...
@@ -205,7 +206,7 @@ class SessionDataManager(Item, Implicit, Persistent, RoleManager, Owned, Tabs):
...
@@ -205,7 +206,7 @@ class SessionDataManager(Item, Implicit, Persistent, RoleManager, Owned, Tabs):
transactions for mounted storages. """
transactions for mounted storages. """
if self.obpath is None:
if self.obpath is None:
err = '
Session
data
container
is
unspecified
in
%
s
' % self.getId()
err = '
Session
data
container
is
unspecified
in
%
s
' % self.getId()
LOG
('
Session
Tracking
', WARNING,
err)
LOG
.warn(
err)
raise SessionIdManagerErr, err
raise SessionIdManagerErr, err
try:
try:
# This should arguably use restrictedTraverse, but it
# This should arguably use restrictedTraverse, but it
...
@@ -215,8 +216,7 @@ class SessionDataManager(Item, Implicit, Persistent, RoleManager, Owned, Tabs):
...
@@ -215,8 +216,7 @@ class SessionDataManager(Item, Implicit, Persistent, RoleManager, Owned, Tabs):
# hasattr hides conflicts
# hasattr hides conflicts
if DEBUG and not getattr(self, '
_v_wrote_dc_type
', None):
if DEBUG and not getattr(self, '
_v_wrote_dc_type
', None):
args = '
/
'.join(self.obpath)
args = '
/
'.join(self.obpath)
LOG('
Session
Tracking
', BLATHER,
LOG.debug('
External
data
container
at
%
s
in
use
' % args)
'
External
data
container
at
%
s
in
use
' % args)
self._v_wrote_dc_type = 1
self._v_wrote_dc_type = 1
return self.unrestrictedTraverse(self.obpath)
return self.unrestrictedTraverse(self.obpath)
except:
except:
...
@@ -281,7 +281,7 @@ class SessionDataManagerTraverser(Persistent):
...
@@ -281,7 +281,7 @@ class SessionDataManagerTraverser(Persistent):
getSessionData
=
sdm
.
getSessionData
getSessionData
=
sdm
.
getSessionData
except
:
except
:
msg
=
'Session automatic traversal failed to get session data'
msg
=
'Session automatic traversal failed to get session data'
LOG
(
'Session Tracking'
,
WARNING
,
msg
,
error
=
sys
.
exc_info
())
LOG
.
warn
(
msg
,
exc_info
=
sys
.
exc_info
())
return
return
# set the getSessionData method in the "lazy" namespace
# set the getSessionData method in the "lazy" namespace
...
...
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