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

Few bug fixes and improvements #58

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions dreampielib/subprocess/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ def execute(self, source):
PeekNamedPipe(handle, None, 0, None, byref(avail), None)
nAvail = avail.value
if nAvail > 0:
rem_stdin.append(os.read(fd, nAvail))
rem_stdin.append(unicodify(os.read(fd, nAvail)))
else:
# I don't know how to do this in Jython.
pass
Expand Down Expand Up @@ -628,7 +628,8 @@ def get_func_args(self, expr):
if not py3k:
args = inspect.getargspec(obj)[0]
else:
args = inspect.getfullargspec(obj).args #@UndefinedVariable
argspec = inspect.getfullargspec(obj)
args = argspec.args + argspec.kwonlyargs #@UndefinedVariable
except TypeError:
return None
# There may be nested args, so we filter them
Expand Down Expand Up @@ -828,7 +829,8 @@ def get_func_doc(self, expr):
# If so, return pydoc's documentation.
# This test is CPython-specific. Another approach would be to look for
# the string in the source code.
co_consts = getattr(getattr(obj, 'func_code', None), 'co_consts', None)
func_code = getattr(obj, '__code__', getattr(obj, 'func_code', None))
co_consts = getattr(func_code, 'co_consts', None)
__doc__ = getattr(obj, '__doc__', None)
if co_consts is not None and __doc__ is not None:
if __doc__ not in co_consts:
Expand Down