[server] fix --help output when redirected through pipes, fix bug 4049

This commit is contained in:
Fabio Erculiani
2013-03-08 12:55:59 +01:00
parent 113f9d74b7
commit a1e59c352f
35 changed files with 85 additions and 35 deletions

View File

@@ -12,6 +12,7 @@
import sys
import os
import argparse
import functools
from entropy.i18n import _
from entropy.output import darkgreen, teal, brown, \
@@ -116,7 +117,7 @@ If you would like to selectively add certain packages, please see
try:
nsargs = parser.parse_args(self._args)
except IOError as err:
return parser.print_help, []
return functools.partial(self.print_help, parser), []
self._interactive = nsargs.interactive
if not self._interactive: