Skip to content

Commit

Permalink
Refactor watch logic to consolidate to single if clause.
Browse files Browse the repository at this point in the history
  • Loading branch information
mblayman committed Jan 2, 2016
1 parent 2fbbb0d commit c9bca03
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions handroll/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,14 @@ def main(argv=sys.argv):
director = Director(config, site, extensions)
director.produce()

if not args.watch:
if args.watch:
serve(site, director)
else:
finish()
except AbortError as abort:
logger.error(str(abort))
sys.exit(_('Incomplete.'))

if args.watch:
serve(site, director)


def parse_args(argv):
description = _('A website generator for software artisans')
Expand Down

0 comments on commit c9bca03

Please sign in to comment.