Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
fuchsia.googlesource.com-third_party-mako
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fuchsia-mirror
fuchsia.googlesource.com-third_party-mako
Commits
f9895752
Commit
f9895752
authored
17 years ago
by
Ben Bangert
Browse files
Options
Downloads
Patches
Plain Diff
Adding Python 2.3 hack for Beaker import to work properly without memcached.
parent
f594e723
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/mako/cache.py
+11
-11
11 additions, 11 deletions
lib/mako/cache.py
with
11 additions
and
11 deletions
lib/mako/cache.py
+
11
−
11
View file @
f9895752
...
...
@@ -3,20 +3,20 @@ from mako import exceptions
try
:
import
beaker.container
as
container
import
beaker.exceptions
clsmap
=
{
'
memory
'
:
container
.
MemoryContainer
,
'
dbm
'
:
container
.
DBMContainer
,
'
file
'
:
container
.
FileContainer
,
}
try
:
import
beaker.ext.memcached
as
memcached
clsmap
=
{
'
memory
'
:
container
.
MemoryContainer
,
'
dbm
'
:
container
.
DBMContainer
,
'
file
'
:
container
.
FileContainer
,
'
memcached
'
:
memcached
.
MemcachedContainer
}
# XXX HACK: Python 2.3 under some circumstances will import this module
# even though there's no memcached. This ensures its really
# there before adding it.
if
hasattr
(
memcached
,
'
MemcachedContainer
'
):
clsmap
[
'
memcached
'
]
=
memcached
.
MemcachedContainer
except
beaker
.
exceptions
.
BeakerException
:
clsmap
=
{
'
memory
'
:
container
.
MemoryContainer
,
'
dbm
'
:
container
.
DBMContainer
,
'
file
'
:
container
.
FileContainer
,
}
pass
except
ImportError
:
container
=
None
clsmap
=
{}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment