From 4c8b719d9fcb5c67b4f461961d436532cbd4c8c1 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 10 May 2018 12:03:13 +0200 Subject: fix test check for TMPDIR: do not throw exception if variable does not exist --- src/statistics/test_gnunet_statistics.py.in | 6 +++--- src/statistics/test_statistics_api_data.conf | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/statistics') diff --git a/src/statistics/test_gnunet_statistics.py.in b/src/statistics/test_gnunet_statistics.py.in index 8f6966b6f..96714cf9a 100644 --- a/src/statistics/test_gnunet_statistics.py.in +++ b/src/statistics/test_gnunet_statistics.py.in @@ -8,10 +8,10 @@ import subprocess import time if os.name == "nt": - tmp = os.getenv ("TEMP") -elif os.environ["TMPDIR"]: + tmp = os.getenv ("TEMP") +elif None != os.environ.get("TMPDIR"): tmp = os.getenv("TMPDIR") -elif os.environ["TMP"]: +elif None != os.environ.get("TMP"): tmp = os.getenv("TMP") else: tmp = "/tmp" diff --git a/src/statistics/test_statistics_api_data.conf b/src/statistics/test_statistics_api_data.conf index 66555291c..9ef8d0673 100644 --- a/src/statistics/test_statistics_api_data.conf +++ b/src/statistics/test_statistics_api_data.conf @@ -1,5 +1,5 @@ @INLINE@ ../../contrib/no_forcestart.conf +@INLINE@ ../../contrib/no_autostart_above_core.conf [PATHS] GNUNET_TEST_HOME = $GNUNET_TMP/test-gnunet-statistics/ - -- cgit v1.2.3