From 34926dde8cace7ce0d72abd210c4c05ce179189b Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Thu, 12 Jan 2017 11:34:15 +0100 Subject: [PATCH] fix acces to view properties; optional use global copyright option --- browser/node.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/browser/node.py b/browser/node.py index c59b219..c69cb31 100755 --- a/browser/node.py +++ b/browser/node.py @@ -105,7 +105,7 @@ class NodeView(BaseView): @Lazy def viewConfigOptions(self): result = {} - for opt in self.viewConfig['options']: + for opt in self.viewConfig.get('options') or []: if ':' in opt: k, v = opt.split(':', 1) result[k] = v.split(',') @@ -113,9 +113,12 @@ class NodeView(BaseView): result[opt] = True return result - #@Lazy + @Lazy def copyright(self): cr = self.viewConfigOptions.get('copyright') + if cr: + return cr[0] + cr = self.globalOptions('copyright') return cr and cr[0] or 'cyberconcepts.org team' @Lazy