projects
/
pyelftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
34d8001
)
better way to check if a dir exists
author
Eli Bendersky
<eliben@gmail.com>
Mon, 8 Apr 2013 13:45:01 +0000
(06:45 -0700)
committer
Eli Bendersky
<eliben@gmail.com>
Mon, 8 Apr 2013 13:45:01 +0000
(06:45 -0700)
test/utils.py
patch
|
blob
|
history
diff --git
a/test/utils.py
b/test/utils.py
index 7a3b83f313fb745482de06ac273e1bda030d2a5f..908cfcc529cd8912fd82dc4760c0df46f3aa246d 100644
(file)
--- a/
test/utils.py
+++ b/
test/utils.py
@@
-36,8
+36,7
@@
def run_exe(exe_path, args):
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):