wrong use of is_dir
zjuchenyuan opened this issue · 0 comments
zjuchenyuan commented
is this a typo to use is_dir to check file exists?
def get_cycle_num(id_num, cargs):
### default cycle
cycle_num = 0
if not is_dir(cargs.afl_fuzzing_dir + '/plot_data'):
return cycle_num
the function is_dir
is defined to check if the argument is a directory and not a file:
def is_dir(dpath):
return os.path.exists(dpath) and os.path.isdir(dpath)