From 1ebddbe094a78be0a944830f97a771c87bd09d82 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 11 Mar 2012 07:25:04 +0000 Subject: -LRN: Make gnunet_testing.py W32-compatible --- src/integration-tests/gnunet_testing.py.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/integration-tests/gnunet_testing.py.in b/src/integration-tests/gnunet_testing.py.in index 79cbfe9a2..f8b8ff31d 100644 --- a/src/integration-tests/gnunet_testing.py.in +++ b/src/integration-tests/gnunet_testing.py.in @@ -224,7 +224,11 @@ class Peer: server.spawn (None, [self.test.gnunetstatistics, '-c', self.cfg ,'-q','-n', name, '-s', subsystem ], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) #server.expect ("stdout", re.compile (r"")) test = server.read("stdout", 10240) - tests = test.partition('\n')[0] + tests = test.partition('\n') + # On W32 GNUnet outputs with \r\n, rather than \n + if os.name == 'nt' and tests[1] == '\n' and tests[0][-1] == '\r': + tests = (tests[0][:-1], tests[1], tests[2]) + tests = tests[0] if (tests.isdigit() == True): return tests else: -- cgit v1.2.3