Skip to content

Commit 1c04436

Browse files
authored
ensure we do not fail if no urls to check to close #84 (#67)
Signed-off-by: vsoch <vsoch@users.noreply.github.com> Co-authored-by: vsoch <vsoch@users.noreply.github.com>
1 parent 1f9bd5c commit 1c04436

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and **Merged pull requests**. Critical items to know are:
1212
Referenced versions in headers are tagged on Github, in parentheses are for pypi.
1313

1414
## [vxx](https://github.com/urlstechie/urlschecker-python/tree/master) (master)
15+
- don't exit and fail if no URLs to check (0.0.27)
1516
- multiprocessing to speed up checks (0.0.26)
1617
- bug fix for verbose option to only print file names that have failures (0.0.25)
1718
- adding option to print a summary that contains file names and urls (0.0.24)

urlchecker/core/check.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,10 @@ def run(
190190
funcs[file_name] = check_task
191191

192192
results = workers.run(funcs, tasks)
193+
if not results:
194+
print("\U0001F914 There were no URLs to check.")
195+
sys.exit(0)
196+
193197
for file_name, result in results.items():
194198
self.checks[file_name] = result
195199
self.results["failed"].update(result["failed"])

urlchecker/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
88
"""
99

10-
__version__ = "0.0.26"
10+
__version__ = "0.0.27"
1111
AUTHOR = "Ayoub Malek, Vanessa Sochat"
1212
AUTHOR_EMAIL = "superkogito@gmail.com, vsochat@stanford.edu"
1313
NAME = "urlchecker"

0 commit comments

Comments
 (0)