Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
diffoscope
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Reproducible Builds
diffoscope
Commits
d43d580a
Commit
d43d580a
authored
4 years ago
by
Chris Lamb
Browse files
Options
Downloads
Patches
Plain Diff
Rename bail_if_non_existing to exit_if_paths_do_not_exist.
parent
e01f3df0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
diffoscope/comparators/utils/compare.py
+2
-2
2 additions, 2 deletions
diffoscope/comparators/utils/compare.py
diffoscope/readers/__init__.py
+2
-2
2 additions, 2 deletions
diffoscope/readers/__init__.py
diffoscope/utils.py
+1
-1
1 addition, 1 deletion
diffoscope/utils.py
with
5 additions
and
5 deletions
diffoscope/comparators/utils/compare.py
+
2
−
2
View file @
d43d580a
...
...
@@ -26,7 +26,7 @@ import subprocess
from
diffoscope.tools
import
tool_required
from
diffoscope.exc
import
RequiredToolNotFound
from
diffoscope.utils
import
bail_if_non
_exist
ing
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
_exist
ing
(
path1
,
path2
)
exit_if_paths_do_not
_exist
(
path1
,
path2
)
if
any_excluded
(
path1
,
path2
):
return
None
...
...
This diff is collapsed.
Click to expand it.
diffoscope/readers/__init__.py
+
2
−
2
View file @
d43d580a
...
...
@@ -20,13 +20,13 @@
import
codecs
from
diffoscope.utils
import
bail_if_non
_exist
ing
from
diffoscope.utils
import
exit_if_paths_do_not
_exist
from
.json
import
JSONReaderV1
def
load_diff_from_path
(
path
):
bail_if_non
_exist
ing
(
path
)
exit_if_paths_do_not
_exist
(
path
)
with
open
(
path
,
"
rb
"
)
as
fp
:
return
load_diff
(
codecs
.
getreader
(
"
utf-8
"
)(
fp
),
path
)
...
...
This diff is collapsed.
Click to expand it.
diffoscope/utils.py
+
1
−
1
View file @
d43d580a
...
...
@@ -55,7 +55,7 @@ def format_bytes(size, decimal_places=2):
return
f
"
{
size
:
.
{
decimal_places
}
f
}
{
unit
}
"
def
bail_if_non
_exist
ing
(
*
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
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment