Commit 71c39325 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Except on TypeError as memcache cannot receive None as Key

parent 6ad7f5b9
...@@ -6,7 +6,7 @@ memcached_dict = context.getPortalObject().portal_memcached.getMemcachedDict( ...@@ -6,7 +6,7 @@ memcached_dict = context.getPortalObject().portal_memcached.getMemcachedDict(
plugin_path='portal_memcached/default_memcached_plugin') plugin_path='portal_memcached/default_memcached_plugin')
try: try:
d = memcached_dict[document.getReference()] d = memcached_dict[document.getReference()]
except KeyError: except (KeyError, TypeError):
d = { d = {
"user": "SlapOS Master", "user": "SlapOS Master",
"text": "#error no data found for %s" % document.getReference(), "text": "#error no data found for %s" % document.getReference(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment