[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
+2 -1
View File
@@ -12,6 +12,7 @@
import sys
import os
import argparse
import functools
import tempfile
import codecs
@@ -123,7 +124,7 @@ repository) by pulling updated data.
nsargs = parser.parse_args(self._args)
except IOError as err:
sys.stderr.write("%s\n" % (err,))
return parser.print_help, []
return functools.partial(self.print_help, parser), []
self._ask = not nsargs.quick
self._all = nsargs.all