Permalink
Browse files

Use a more specific exception on non-dict metadata

  • Loading branch information...
1 parent 95cd9e8 commit 5a5ab8fcb146edaafde691fb49bd561c0732b2f3 @SimonSapin SimonSapin committed Sep 20, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 flask_flatpages/__init__.py
@@ -87,8 +87,8 @@ def meta(self):
if not meta:
return {}
if not isinstance(meta, dict):
- raise Exception("Excpecting a valid dict in meta <%(_meta_yaml)s> for page at <%(path)s>" %
- self.__dict__)
+ raise ValueError("Excpected a dict in metadata for '%s', got %s"
+ % (self.path, type(meta).__name__))
return meta
def __getitem__(self, name):

0 comments on commit 5a5ab8f

Please sign in to comment.