[tor-commits] [stem/master] Uses stem.util.system.is_windows() for platform checking in run_tests.py

atagar at torproject.org atagar at torproject.org
Thu Jun 21 15:45:57 UTC 2012


commit 57904d4540dc9e988a431986695e6e1f2f5cf8fa
Author: Beck Chen <csybeck at gmail.com>
Date:   Thu Jun 14 19:11:09 2012 +0800

    Uses stem.util.system.is_windows() for platform checking in run_tests.py
---
 run_tests.py        |    3 ++-
 stem/util/system.py |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/run_tests.py b/run_tests.py
index 780d357..6ab6fae 100644
--- a/run_tests.py
+++ b/run_tests.py
@@ -51,6 +51,7 @@ import stem.util.conf
 import stem.util.enum
 import stem.util.log as log
 import stem.util.term as term
+import stem.util.system as system
 
 OPT = "uit:l:c:h"
 OPT_EXPANDED = ["unit", "integ", "targets=", "test=", "log=", "tor=", "config=", "help"]
@@ -146,7 +147,7 @@ def load_user_configuration(test_config):
     sys.exit(1)
   
   # suppress color output if our output is being piped
-  if (not sys.stdout.isatty()) or (platform.system() == "Windows"):
+  if (not sys.stdout.isatty()) or system.is_windows():
     arg_overrides["argument.no_color"] = "true"
   
   for opt, arg in opts:
diff --git a/stem/util/system.py b/stem/util/system.py
index a27d121..3d1a26b 100644
--- a/stem/util/system.py
+++ b/stem/util/system.py
@@ -7,6 +7,7 @@ best-effort, providing None if the lookup fails.
 
 ::
 
+  is_windows - checks if we're running on windows
   is_bsd - checks if we're running on the bsd family of operating systems
   is_available - determines if a command is availabe on this system
   is_running - determines if a given process is running





More information about the tor-commits mailing list