Skip to content

Commit

Permalink
Simplify extension test for XML format
Browse files Browse the repository at this point in the history
  • Loading branch information
Clément Bonnet committed Oct 7, 2015
1 parent d33c9af commit 1f8225f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jinja2cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def cli(opts, args):
else:
if ext in ('yml', 'yaml'):
raise InvalidDataFormat('%s: install pyyaml to fix' % ext)
if ext in ('xml'):
if ext == 'xml':
raise InvalidDataFormat('%s: install xmltodict' % ext)
raise InvalidDataFormat(ext)
data = open(path).read()
Expand Down Expand Up @@ -301,7 +301,7 @@ def main():
if opts.format not in formats and opts.format != 'auto':
if opts.format in ('yml', 'yaml'):
raise InvalidDataFormat('%s: install pyyaml to fix' % opts.format)
if opts.format in ('xml'):
if opts.format == 'xml':
raise InvalidDataFormat('%s: install xmltodict' % opts.format)
raise InvalidDataFormat(opts.format)

Expand Down

0 comments on commit 1f8225f

Please sign in to comment.