Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Unified Diff: tools/sort-headers.py

Issue 888873003: tools/sort_sources.py: sort C++ source file names in build files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « google_apis/google_apis.gyp ('k') | tools/sort_sources.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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):
« no previous file with comments | « google_apis/google_apis.gyp ('k') | tools/sort_sources.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698