diff --git a/fluent/handler.py b/fluent/handler.py index 9297550..d68d479 100644 --- a/fluent/handler.py +++ b/fluent/handler.py @@ -79,6 +79,9 @@ def __init__(self, fmt=None, datefmt=None, style='%', fill_missing_fmt_key=False self._formatter = fmt self.usesTime = fmt.usesTime else: + if type(fmt) == str: + import ast + fmt = ast.literal_eval(fmt) self._fmt_dict = fmt self._formatter = self._format_by_dict self.usesTime = self._format_by_dict_uses_time