Skip to content

Commit

Permalink
fix: stdout return early
Browse files Browse the repository at this point in the history
  • Loading branch information
simoncoulton committed Feb 24, 2017
1 parent b80ec77 commit 0578ae6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGES
@@ -1,3 +1,6 @@
2.6.2
- Fix for outputing to stdout and returning early

2.6.1
- Option to output to the stdout rather than files

Expand Down
2 changes: 1 addition & 1 deletion watson/db/__init__.py
@@ -1,2 +1,2 @@
# -*- coding: utf-8 -*-
__version__ = '2.6.1'
__version__ = '2.6.2'
10 changes: 5 additions & 5 deletions watson/db/commands.py
Expand Up @@ -155,11 +155,11 @@ def generate_fixtures(self, models, output_to_stdout):
records = json.dumps(records, indent=4)
if output_to_stdout:
self.write(records)
return
model_name, path = fixtures.save(
model, records, self.config['fixtures'])
self.write(
'Created fixture for {} at {}'.format(model_name, path))
else:
model_name, path = fixtures.save(
model, records, self.config['fixtures'])
self.write(
'Created fixture for {} at {}'.format(model_name, path))

@arg()
def dump(self):
Expand Down

0 comments on commit 0578ae6

Please sign in to comment.