Skip to content
This repository has been archived by the owner on Dec 10, 2017. It is now read-only.

Bug fixes and read from stdin #13

Merged
merged 2 commits into from
Aug 1, 2014

Conversation

samrocketman
Copy link
Contributor

Revised from #12.

Fixes three bugs:

  • importing herd and testing functions from within the python interactive interpreter executes code undesirably. Fixed.
  • Junk being passed into --hostlist not being sanitized like other methods. Fixed.
  • Blank list being passed into --hostlist not being detected as an error. Fixed.

Adds a feature:

  • Reading the host list from stdin if hosts.dat and --hostlist is not provided in the arguments.

This is useful for loading up the interactive interpreter to test
out some of the functions during development.

This way herd.py can be imported like:
import herd
Example:
    cat hosts.dat | ./herd.py /tmp/test /tmp/test

Fixes bug if --hostlist is passed junk like:
    ./herd.py --hostlist 1,2,3,,,\#test /tmp/test /tmp/test

Fixes bug --hostlist passing blank list of hosts like:
    ./herd.py --hostlist '' /tmp/test /tmp/test
@samrocketman samrocketman changed the title Feature/stdin hosts Bug fixes and read from stdin Jul 31, 2014
russss added a commit that referenced this pull request Aug 1, 2014
@russss russss merged commit 69e3544 into russss:master Aug 1, 2014
@samrocketman samrocketman deleted the feature/stdin-hosts branch August 2, 2014 01:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants