[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [stem/master] Replace calls to os.uname() by platform.uname()



commit 9724963081f269eb68b17cf116c950dbd6591474
Author: Beck <csybeck@xxxxxxxxx>
Date:   Fri Jun 22 19:51:59 2012 +0800

    Replace calls to os.uname() by platform.uname()
    
    os.uname() is unix-specific, while platform.uname() is a more portable
    uname interface that would also work on windows. And platform.system()
    == platform.uname()[0].
---
 test/integ/util/system.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/run_tests.py b/run_tests.py
old mode 100755
new mode 100644
diff --git a/test/integ/util/system.py b/test/integ/util/system.py
index 7999cbb..3af6f77 100644
--- a/test/integ/util/system.py
+++ b/test/integ/util/system.py
@@ -4,6 +4,7 @@ that we're running.
 """
 
 import os
+import platform
 import getpass
 import unittest
 
@@ -293,7 +294,7 @@ class TestSystem(unittest.TestCase):
     """
     
     # on macs this test is unreliable because Quicklook sometimes claims '/tmp'
-    if os.uname()[0] == "Darwin":
+    if platform.system() == "Darwin":
       test.runner.skip(self, "(unreliable due to Quicklook)")
       return
     



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits