diff options
author | gbrandl <devnull@localhost> | 2007-06-30 22:06:39 +0200 |
---|---|---|
committer | gbrandl <devnull@localhost> | 2007-06-30 22:06:39 +0200 |
commit | db3bdefe207add8cf1b26e626949d1e7dd6ef644 (patch) | |
tree | cce73807829efe6ec61bfcc87cfc09d9430eaf9a | |
parent | 04ec598059024c63c363b46b64929dabccf46ae7 (diff) | |
download | pygments-db3bdefe207add8cf1b26e626949d1e7dd6ef644.tar.gz |
[svn] Be even more cautious.
-rw-r--r-- | pygments/cmdline.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pygments/cmdline.py b/pygments/cmdline.py index 8d7b56fe..2aba87ca 100644 --- a/pygments/cmdline.py +++ b/pygments/cmdline.py @@ -342,8 +342,8 @@ def main(args): fmter.encoding = 'latin1' else: # use terminal encoding - lexer.encoding = sys.stdin.encoding or 'ascii' - fmter.encoding = sys.stdout.encoding or 'ascii' + lexer.encoding = getattr(sys.stdin, 'encoding', None) or 'ascii' + fmter.encoding = getattr(sys.stdout, 'encoding', None) or 'ascii' # ... and do it! try: |