Skip to content

Commit

Permalink
only look for urls if a filename is provided on init of UrlCheckerRes…
Browse files Browse the repository at this point in the history
…ult (#68)

Signed-off-by: vsoch <vsoch@users.noreply.github.com>
Co-authored-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch and vsoch committed Apr 2, 2022
1 parent 1c04436 commit 3a13e4e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and **Merged pull requests**. Critical items to know are:
Referenced versions in headers are tagged on Github, in parentheses are for pypi.

## [vxx](https://github.com/urlstechie/urlschecker-python/tree/master) (master)
- decrease verbosity when filename is None (0.0.28)
- don't exit and fail if no URLs to check (0.0.27)
- multiprocessing to speed up checks (0.0.26)
- bug fix for verbose option to only print file names that have failures (0.0.25)
Expand Down
5 changes: 4 additions & 1 deletion urlchecker/core/urlproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ def __init__(
self.urls = []
self.exclude_patterns = exclude_patterns or []
self.exclude_urls = exclude_urls or []
self.extract_urls()

# Only extract if we have a filename in advance
if self.file_name:
self.extract_urls()

def __str__(self):
if self.file_name:
Expand Down
2 changes: 1 addition & 1 deletion urlchecker/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"""

__version__ = "0.0.27"
__version__ = "0.0.28"
AUTHOR = "Ayoub Malek, Vanessa Sochat"
AUTHOR_EMAIL = "superkogito@gmail.com, vsochat@stanford.edu"
NAME = "urlchecker"
Expand Down

0 comments on commit 3a13e4e

Please sign in to comment.