diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-05-10 12:03:13 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-05-10 12:03:13 +0200 |
commit | 4c8b719d9fcb5c67b4f461961d436532cbd4c8c1 (patch) | |
tree | 4b7b1bcd11df7ea1b327bf1032f7d928ab55ff93 /src/statistics | |
parent | d3245124b4b2918c6dbd64aa237e96d96279e48b (diff) | |
download | gnunet-4c8b719d9fcb5c67b4f461961d436532cbd4c8c1.tar.gz gnunet-4c8b719d9fcb5c67b4f461961d436532cbd4c8c1.zip |
fix test check for TMPDIR: do not throw exception if variable does not exist
Diffstat (limited to 'src/statistics')
-rw-r--r-- | src/statistics/test_gnunet_statistics.py.in | 6 | ||||
-rw-r--r-- | src/statistics/test_statistics_api_data.conf | 2 |
2 files changed, 4 insertions, 4 deletions
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 | |||
8 | import time | 8 | import time |
9 | 9 | ||
10 | if os.name == "nt": | 10 | if os.name == "nt": |
11 | tmp = os.getenv ("TEMP") | 11 | tmp = os.getenv ("TEMP") |
12 | elif os.environ["TMPDIR"]: | 12 | elif None != os.environ.get("TMPDIR"): |
13 | tmp = os.getenv("TMPDIR") | 13 | tmp = os.getenv("TMPDIR") |
14 | elif os.environ["TMP"]: | 14 | elif None != os.environ.get("TMP"): |
15 | tmp = os.getenv("TMP") | 15 | tmp = os.getenv("TMP") |
16 | else: | 16 | else: |
17 | tmp = "/tmp" | 17 | 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 @@ | |||
1 | @INLINE@ ../../contrib/no_forcestart.conf | 1 | @INLINE@ ../../contrib/no_forcestart.conf |
2 | @INLINE@ ../../contrib/no_autostart_above_core.conf | ||
2 | 3 | ||
3 | [PATHS] | 4 | [PATHS] |
4 | GNUNET_TEST_HOME = $GNUNET_TMP/test-gnunet-statistics/ | 5 | GNUNET_TEST_HOME = $GNUNET_TMP/test-gnunet-statistics/ |
5 | |||