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

Unified Diff: tools/utils.py

Issue 8234029: Cleans up style problems in architecture.py and test_runner.py (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 2 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
« tools/testing/test_runner.py ('K') | « tools/testing/test_runner.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/utils.py
diff --git a/tools/utils.py b/tools/utils.py
index 0917aa4f43a30a688dbdf9688e6aa9f177965a62..f65d9e6c273f41baf0aacc2bbe37afe53b7d17de 100644
--- a/tools/utils.py
+++ b/tools/utils.py
@@ -197,10 +197,19 @@ def Daemonize():
def PrintError(str):
+ """Writes and flushes a string to stderr."""
sys.stderr.write(str)
sys.stderr.write('\n')
+def CheckedUnlink(name):
+ """Unlink a file without throwing an exception."""
+ try:
+ os.unlink(name)
+ except OSError, e:
+ PrintError("os.unlink() " + str(e))
+
+
def Main(argv):
print "GuessOS() -> ", GuessOS()
print "GuessArchitecture() -> ", GuessArchitecture()
« tools/testing/test_runner.py ('K') | « tools/testing/test_runner.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698