diff options
author | W. Trevor King <wking@drexel.edu> | 2009-12-13 06:19:23 -0500 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-12-13 06:19:23 -0500 |
commit | 4d057dab603f42ec40b911dbee6792dcf107bd14 (patch) | |
tree | 9a73459aa160e3c96f4893b132543f412ca6e97f /libbe/command/base.py | |
parent | dff6bd9bf89ca80e2265696a478e540476718c9c (diff) | |
download | bugseverywhere-4d057dab603f42ec40b911dbee6792dcf107bd14.tar.gz |
Converted libbe.storage.vcs.base to new Storage format.
Diffstat (limited to 'libbe/command/base.py')
-rw-r--r-- | libbe/command/base.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libbe/command/base.py b/libbe/command/base.py index 252dd24..52f193d 100644 --- a/libbe/command/base.py +++ b/libbe/command/base.py @@ -1,5 +1,6 @@ # Copyright +import codecs import optparse import sys @@ -168,7 +169,7 @@ class Command (object): else: # non-arg options are flags, set to default flag value params[option.name] = False if len(options) > 0: - raise UserError, 'Invalid options passed to command %s:\n %s' \ + raise UserError, 'Invalid option passed to command %s:\n %s' \ % (self.name, '\n '.join(['%s: %s' % (k,v) for k,v in options.items()])) for arg in self.args: @@ -190,9 +191,9 @@ class Command (object): def _setup_io(self, input_encoding=None, output_encoding=None): if input_encoding == None: - input_encoding = libbe.util.get_input_encoding() + input_encoding = libbe.util.encoding.get_input_encoding() if output_encoding == None: - output_encoding = libbe.util.get_output_encoding() + output_encoding = libbe.util.encoding.get_output_encoding() self.stdin = codecs.getwriter(input_encoding)(sys.stdin) self.stdin.encoding = input_encoding self.stdout = codecs.getwriter(output_encoding)(sys.stdout) |