~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to userinteractor.py

  • Committer: Michael Ellerman
  • Date: 2005-11-29 19:16:41 UTC
  • mto: (0.3.1 shelf-dev) (325.1.2 bzrtools)
  • mto: This revision was merged to the branch mainline in revision 334.
  • Revision ID: michael@ellerman.id.au-20051129191641-8ef5f036343f3ae9
Fix tests, now that we don't wrap exceptions we return 3 on error, not 1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/python
 
2
 
1
3
import sys
2
4
 
3
5
class UserOption:
132
134
            print '  %s - %s' % (opt.char, opt.help)
133
135
 
134
136
    if sys.platform == "win32":
 
137
        import msvcrt
135
138
        def __getchar(self):
136
 
            import msvcrt
137
 
            return msvcrt.getch()
 
139
            return msvcrt.getche()
138
140
    else:
139
141
        def __getchar(self):
140
142
            import tty