Permalink
Browse files

Raise Exception instead of returning None.

  • Loading branch information...
herm committed Sep 15, 2012
1 parent 18b6567 commit e629cbb1c3e75649a157a172567d913bf65ac2fd
Showing with 2 additions and 2 deletions.
  1. +2 −2 bindings/python/mapnik/__init__.py
@@ -703,8 +703,8 @@ def name(self):
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):

0 comments on commit e629cbb

Please sign in to comment.