Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for a file descriptor before trying to close it #142

Merged
merged 2 commits into from Jun 13, 2014

Conversation

@singingwolfboy
Copy link
Contributor

@singingwolfboy singingwolfboy commented Jun 12, 2014

This was causing a traceback for me:

% inv --list
Traceback (most recent call last):
  File "/usr/local/bin/inv", line 9, in <module>
    load_entry_point('invoke==0.8.1', 'console_scripts', 'inv')()
  File "/usr/local/lib/python2.7/site-packages/invoke/cli.py", line 279, in main
    dispatch(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/invoke/cli.py", line 265, in dispatch
    args, collection, parser_contexts = parse(argv, version=version)
  File "/usr/local/lib/python2.7/site-packages/invoke/cli.py", line 188, in parse
    collection = loader.load(start) if start else loader.load()
  File "/usr/local/lib/python2.7/site-packages/invoke/loader.py", line 52, in load
    fd.close()
AttributeError: 'NoneType' object has no attribute 'close'
@bitprophet
Copy link
Member

@bitprophet bitprophet commented Jun 13, 2014

Thanks, this looks legit! Took me a bit to figure it out before I noticed your test, heh.

@bitprophet bitprophet merged commit de42ec0 into pyinvoke:master Jun 13, 2014
1 check passed
1 check passed
continuous-integration/travis-ci The Travis CI build passed
Details
bitprophet added a commit that referenced this pull request Jun 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.