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

Broken pipe should not crash the program #39

Closed
kevinjqiu opened this issue Jul 29, 2016 · 0 comments
Closed

Broken pipe should not crash the program #39

kevinjqiu opened this issue Jul 29, 2016 · 0 comments
Labels
Milestone

Comments

@kevinjqiu
Copy link
Owner

admin@localhost/test> ls | grep 
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.
Traceback (most recent call last):
  File "/home/kevin/src/cdbcli/env/bin/cdbcli", line 9, in <module>
    load_entry_point('cdbcli', 'console_scripts', 'cdbcli')()
  File "/home/kevin/src/cdbcli/env/lib/python3.5/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/home/kevin/src/cdbcli/env/lib/python3.5/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/home/kevin/src/cdbcli/env/lib/python3.5/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/kevin/src/cdbcli/env/lib/python3.5/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/home/kevin/src/cdbcli/cdbcli/main.py", line 69, in main
    r.run()
  File "/home/kevin/src/cdbcli/cdbcli/repl.py", line 103, in run
    self._run()
  File "/home/kevin/src/cdbcli/cdbcli/repl.py", line 89, in _run
    eval_(self._environment, self._couch_server, cmd_text)
  File "/home/kevin/src/cdbcli/cdbcli/repl.py", line 44, in eval_
    handler(environment=environment, couch_server=couch_server, variables=m.variables())
  File "/home/kevin/src/cdbcli/cdbcli/commands.py", line 22, in wrapper
    return fn(*args, **kwargs)
  File "/home/kevin/src/cdbcli/cdbcli/commands.py", line 76, in ls
    environment.output('{} {}'.format(type_, doc))
  File "/home/kevin/src/cdbcli/cdbcli/environment.py", line 28, in output
    self.output_stream.flush()
BrokenPipeError: [Errno 32] Broken pipe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant