From 924f3fb19c86304529d580a130c2ac885ee3d944 Mon Sep 17 00:00:00 2001 From: Hermann Kraus Date: Sat, 15 Sep 2012 02:06:08 +0200 Subject: [PATCH] Raise Exception instead of returning None. --- bindings/python/mapnik/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/python/mapnik/__init__.py b/bindings/python/mapnik/__init__.py index 6f7b9fbb9..1b66dd92a 100644 --- a/bindings/python/mapnik/__init__.py +++ b/bindings/python/mapnik/__init__.py @@ -703,8 +703,8 @@ class _TextSymbolizer(TextSymbolizer,_injector): if isinstance(self.properties.format_tree, FormattingText): return self.properties.format_tree.text else: - return None # This text symbolizer is using complex formatting features. - # There is no single expression which could be returned as name + # There is no single expression which could be returned as name + raise RuntimeError("TextSymbolizer uses complex formatting features, but old compatibility interface is used to access it. Use self.properties.format_tree instead.") @name.setter def name(self, name):