Skip to content
Snippets Groups Projects
Commit d43d580a authored by Chris Lamb's avatar Chris Lamb :eyes:
Browse files

Rename bail_if_non_existing to exit_if_paths_do_not_exist.

parent e01f3df0
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,7 @@ import subprocess
from diffoscope.tools import tool_required
from diffoscope.exc import RequiredToolNotFound
from diffoscope.utils import bail_if_non_existing
from diffoscope.utils import exit_if_paths_do_not_exist
from diffoscope.config import Config
from diffoscope.excludes import any_excluded
from diffoscope.profiling import profile
......@@ -60,7 +60,7 @@ def compare_root_paths(path1, path2):
)
if not Config().new_file:
bail_if_non_existing(path1, path2)
exit_if_paths_do_not_exist(path1, path2)
if any_excluded(path1, path2):
return None
......
......@@ -20,13 +20,13 @@
import codecs
from diffoscope.utils import bail_if_non_existing
from diffoscope.utils import exit_if_paths_do_not_exist
from .json import JSONReaderV1
def load_diff_from_path(path):
bail_if_non_existing(path)
exit_if_paths_do_not_exist(path)
with open(path, "rb") as fp:
return load_diff(codecs.getreader("utf-8")(fp), path)
......
......@@ -55,7 +55,7 @@ def format_bytes(size, decimal_places=2):
return f"{size:.{decimal_places}f} {unit}"
def bail_if_non_existing(*paths):
def exit_if_paths_do_not_exist(*paths):
if not all(map(os.path.lexists, paths)):
for path in paths:
if not os.path.lexists(path):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment