Skip to content

Commit

Permalink
allow help(sh)
Browse files Browse the repository at this point in the history
  • Loading branch information
amoffat committed Apr 24, 2020
1 parent 1e15190 commit 1a56211
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* more efficiently closing inherited fds [#406](https://github.com/amoffat/sh/issues/406)
* bugfix where passing invalid dictionary to `_env` will cause a mysterious child 255 exit code. [#497](https://github.com/amoffat/sh/pull/497)
* bugfix where `_in` using 0 or `sys.stdin` wasn't behaving like a TTY, if it was in fact a TTY. [#514](https://github.com/amoffat/sh/issues/514)
* bugfix where `help(sh)` raised an exception [#455](https://github.com/amoffat/sh/issues/455)

## 1.12.14 - 6/6/17
* bugfix for poor sleep performance [#378](https://github.com/amoffat/sh/issues/378)
Expand Down
6 changes: 3 additions & 3 deletions sh.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
from functools import partial
import inspect
import tempfile
import warnings
import stat
import glob as glob_module
import ast
Expand Down Expand Up @@ -3229,9 +3230,8 @@ def __getitem__(self, k):

# somebody tried to be funny and do "from sh import *"
if k == "__all__":
raise RuntimeError("Cannot import * from sh. \
Please import sh or import programs individually.")

warnings.warn("Cannot import * from sh. Please import sh or import programs individually.")
return []

# check if we're naming a dynamically generated ReturnCode exception
exc = get_exc_from_name(k)
Expand Down

0 comments on commit 1a56211

Please sign in to comment.