diff --git a/jinja2cli/cli.py b/jinja2cli/cli.py old mode 100644 new mode 100755 index 79d84db..510d3b2 --- a/jinja2cli/cli.py +++ b/jinja2cli/cli.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + """ jinja2-cli ========== @@ -354,9 +356,11 @@ def __init__(self, **kwargs): def get_version(self): from jinja2 import __version__ as jinja_version - from jinja2cli import __version__ - - return "jinja2-cli v%s\n - Jinja2 v%s" % (__version__, jinja_version) + try: + from jinja2cli import __version__ + return "jinja2-cli v%s\n - Jinja2 v%s" % (__version__, jinja_version) + except ImportError: + return "jinja2-cli\n - Jinja2 v%s" % (jinja_version) def main():