Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2ea17fa

Browse files
committed
fix inconsistent use of tabs and spaces
convert semicolons to newlines
1 parent 04f39aa commit 2ea17fa

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

Lib/curses/wrapper.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ def wrapper(func, *rest):
2020
res = None
2121
try:
2222
# Initialize curses
23-
stdscr=curses.initscr()
23+
stdscr=curses.initscr()
2424

2525
# Turn off echoing of keys, and enter cbreak mode,
2626
# where no buffering is performed on keyboard input
27-
curses.noecho() ; curses.cbreak()
27+
curses.noecho()
28+
curses.cbreak()
2829

2930
# In keypad mode, escape sequences for special keys
3031
# (like the cursor keys) will be interpreted and
@@ -35,17 +36,19 @@ def wrapper(func, *rest):
3536
except:
3637
# In the event of an error, restore the terminal
3738
# to a sane state.
38-
stdscr.keypad(0)
39-
curses.echo() ; curses.nocbreak()
40-
curses.endwin()
39+
stdscr.keypad(0)
40+
curses.echo()
41+
curses.nocbreak()
42+
curses.endwin()
4143

4244
# Pass the exception upwards
4345
(exc_type, exc_value, exc_traceback) = sys.exc_info()
4446
raise exc_type, exc_value, exc_traceback
4547
else:
4648
# Set everything back to normal
47-
stdscr.keypad(0)
48-
curses.echo() ; curses.nocbreak()
49-
curses.endwin() # Terminate curses
49+
stdscr.keypad(0)
50+
curses.echo()
51+
curses.nocbreak()
52+
curses.endwin() # Terminate curses
5053

5154
return res

0 commit comments

Comments
 (0)