Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixes for Python 2.5.

  • Loading branch information...
commit 857835ef985ef19c11091bdb01b8629c6e27bf0e 1 parent b48e19b
@playpauseandstop playpauseandstop authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 flask_flatpages/__init__.py
View
7 flask_flatpages/__init__.py
@@ -330,9 +330,12 @@ def wrapper(body):
except TypeError:
return html_renderer(body)
- if len(spec.args) == 1:
+ # Named tuple available only in Python 2.6+, before raw tuple used
+ spec_args = spec[0] if not hasattr(spec, 'args') else spec.args
+
+ if len(spec_args) == 1:
return html_renderer(body)
- elif len(spec.args) == 2 and spec.args[1] == 'extensions':
+ elif len(spec_args) == 2 and spec_args[1] == 'extensions':
return html_renderer(body, self.config('markdown_extensions'))
raise ValueError(
Please sign in to comment.
Something went wrong with that request. Please try again.