Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong use of is_dir #42

Open
zjuchenyuan opened this issue Jun 23, 2019 · 0 comments
Open

wrong use of is_dir #42

zjuchenyuan opened this issue Jun 23, 2019 · 0 comments

Comments

@zjuchenyuan
Copy link

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant