Skip to content

Commit

Permalink
[FIX] create_host --dry-run works
Browse files Browse the repository at this point in the history
  • Loading branch information
ehorvat-infobytesec committed Aug 16, 2018
1 parent d57a253 commit 581266f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bin/create_host.py
Expand Up @@ -47,6 +47,8 @@ def main(workspace='', args=None, parser=None):
if not parsed_args.dry_run:
models.create_host(workspace, obj_host)
old_host = models.get_host(workspace, **params)
else:
return 0, None
else:
print "A host with ID %s already exists!" % old_host.getID()
return 2, None
Expand Down

0 comments on commit 581266f

Please sign in to comment.