diff options
-rw-r--r-- | mesonbuild/mesonlib.py | 7 | ||||
-rwxr-xr-x | test cases/common/16 configure file/generator.py | 6 |
2 files changed, 3 insertions, 10 deletions
diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py index 007aea8..d06e4eb 100644 --- a/mesonbuild/mesonlib.py +++ b/mesonbuild/mesonlib.py @@ -95,12 +95,7 @@ def is_32bit(): return not(sys.maxsize > 2**32) def is_debianlike(): - try: - with open('/etc/debian_version', 'r'): - pass - return True - except FileNotFoundError: - return False + return os.path.isfile('/etc/debian_version') def exe_exists(arglist): try: diff --git a/test cases/common/16 configure file/generator.py b/test cases/common/16 configure file/generator.py index 90223f0..31a6944 100755 --- a/test cases/common/16 configure file/generator.py +++ b/test cases/common/16 configure file/generator.py @@ -1,13 +1,11 @@ #!/usr/bin/env python3 -import sys +import sys, os if len(sys.argv) != 3: print("Wrong amount of parameters.") -# Just test that it exists. -with open(sys.argv[1], 'r') as ifile: - pass +assert(os.path.exists(sys.argv[1])) with open(sys.argv[2], 'w') as ofile: ofile.write("#define ZERO_RESULT 0\n") |