From: W. Trevor King Date: Sat, 25 Feb 2012 17:53:17 +0000 (-0500) Subject: Add `new` to list of commands that should not default to using the pager. X-Git-Tag: 1.1.0~159 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=2c9ae15f53aef57d28091b237c193c653c6e80dd;p=be.git Add `new` to list of commands that should not default to using the pager. If the command is run in the pager, access to stdin is tricky, so I avoid it by default. I'd just missed the fact that `new -` used stdin, which caused https://bugzilla.redhat.com/show_bug.cgi?id=751473 $ be new - Traceback (most recent call last): ... File "/usr/lib/python2.7/site-packages/libbe/command/new.py", line 89, in _run summary = self.stdin.readline() ... File "/usr/lib64/python2.7/codecs.py", line 473, in read newdata = self.stream.read(size) IOError: [Errno 9] Bad file descriptor --- diff --git a/libbe/ui/command_line.py b/libbe/ui/command_line.py index 3a5f5c4..d6e8d67 100644 --- a/libbe/ui/command_line.py +++ b/libbe/ui/command_line.py @@ -355,7 +355,7 @@ def main(): command = Class(ui=ui) ui.setup_command(command) - if command.name in ['comment', 'commit', 'import-xml', 'serve']: + if command.name in ['new', 'comment', 'commit', 'import-xml', 'serve']: paginate = 'never' else: paginate = 'auto'