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

Check if file exists before continuing #15

Merged
merged 1 commit into from
Jul 4, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
check if file exists
  • Loading branch information
0xibram committed Jul 4, 2017
commit 096c0629fc13aa547ef050983399479f481d6eaa
3 changes: 2 additions & 1 deletion linkfinder.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ def parser_input(input):
return (paths if len(paths) > 0 else parser_error('Input with wildcard does \
not match any files.'))
else:
return ["file:///%s" % os.path.abspath(input)]
path = "file:///%s" % os.path.abspath(input)
return [path if os.path.exists(path) else parser_error("file could not be found.")]

# Send request using Requests

Expand Down