Index: tools/sort-headers.py |
diff --git a/tools/sort-headers.py b/tools/sort-headers.py |
index 3f3435d56b514fca1b56863a479af23dd5355fe5..5e8fc2641f261e502fcb30c64ed80ecc9a4944c9 100755 |
--- a/tools/sort-headers.py |
+++ b/tools/sort-headers.py |
@@ -13,28 +13,7 @@ import optparse |
import os |
import sys |
- |
-def YesNo(prompt): |
- """Prompts with a yes/no question, returns True if yes.""" |
- print prompt, |
- sys.stdout.flush() |
- # http://code.activestate.com/recipes/134892/ |
- if sys.platform == 'win32': |
- import msvcrt |
- ch = msvcrt.getch() |
- else: |
- import termios |
- import tty |
- fd = sys.stdin.fileno() |
- old_settings = termios.tcgetattr(fd) |
- ch = 'n' |
- try: |
- tty.setraw(sys.stdin.fileno()) |
- ch = sys.stdin.read(1) |
- finally: |
- termios.tcsetattr(fd, termios.TCSADRAIN, old_settings) |
- print ch |
- return ch in ('Y', 'y') |
+from yes_no import YesNo |
def IncludeCompareKey(line): |