Running hufflepuff with no arguments causes errors

Issue #1 new
Peter Ward
repo owner created an issue

While the errors make sense, it’s not the nicest thing a new user should see when attempting to run the program for the first time:

$ hufflepuff
cat: initial.json: No such file or directory
Traceback (most recent call last):
  File "/home/flowblok/tmp/fgaq/bin/hufflepuff", line 9, in <module>
    load_entry_point('hufflepuff==1.0', 'console_scripts', 'hufflepuff')()
  File "/home/flowblok/tmp/fgaq/local/lib/python2.7/site-packages/hufflepuff/cli.py", line 77, in main
    states = search.get_initial_states(args.initial_binary)
  File "/home/flowblok/tmp/fgaq/local/lib/python2.7/site-packages/hufflepuff/search.py", line 5, in get_initial_states
    stdout = subprocess.check_output(command, shell=True)
  File "/usr/lib/python2.7/subprocess.py", line 573, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command 'cat initial.json' returned non-zero exit status 1

Though I’m not sure how best to solve this. A terrible way would be to specifically detect this case, and replace the error with usage instructions.

Comments (0)

  1. Log in to comment