commit | 69c3a90eeaef3237c46269a857617d72c6af4d68 | [log] [tgz] |
---|---|---|
author | Eli Bendersky <eliben@gmail.com> | Mon Apr 08 06:45:01 2013 -0700 |
committer | Eli Bendersky <eliben@gmail.com> | Mon Apr 08 06:45:01 2013 -0700 |
tree | 3deb69150dcd9583a5c5247fbe3d4a46ff0435e8 | |
parent | 34d80018fff83af5d314971409eed5687d8bda93 [diff] [blame] |
better way to check if a dir exists
diff --git a/test/utils.py b/test/utils.py index 7a3b83f..908cfcc 100644 --- a/test/utils.py +++ b/test/utils.py
@@ -36,8 +36,7 @@ def is_in_rootdir(): """ Check whether the current dir is the root dir of pyelftools """ - dirstuff = os.listdir('.') - return 'test' in dirstuff and 'elftools' in dirstuff + return os.path.isdir('test') and os.path.isdir('elftools') def dump_output_to_temp_files(testlog, *args):