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

csmock: drop DEFAULT_KNOWN_FALSE_POSITIVES_FALLBACK #118

Closed
wants to merge 2 commits into from
Closed
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
17 changes: 5 additions & 12 deletions py/csmock
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ PATCH_RAWBUILD = CSMOCK_SCRIPTS + "/patch-rawbuild.sh"

DEFAULT_KNOWN_FALSE_POSITIVES = CSMOCK_DATADIR + "/known-false-positives.js"

# original name of the file, which could have sounded offensive to people
DEFAULT_KNOWN_FALSE_POSITIVES_FALLBACK = CSMOCK_DATADIR + "/defect-blacklist.err"

# how long should we wait before checking mock profile availability again
MOCK_WAITING_TICK = 60

Expand Down Expand Up @@ -898,18 +895,14 @@ key event (defaults to 3).")
help="use shell command to build the given tarball (instead of SRPM)")

# --known-false-positives
if os.path.exists(DEFAULT_KNOWN_FALSE_POSITIVES):
default_kfp = DEFAULT_KNOWN_FALSE_POSITIVES
default_kfp_text = " (defaults to \"%s\")" % default_kfp
elif os.path.exists(DEFAULT_KNOWN_FALSE_POSITIVES_FALLBACK):
default_kfp = DEFAULT_KNOWN_FALSE_POSITIVES_FALLBACK
default_kfp_text = " (defaults to \"%s\")" % default_kfp
else:
default_kfp = DEFAULT_KNOWN_FALSE_POSITIVES
default_kfp_text = f'defaults to "{default_kfp}"'
if not os.path.exists(default_kfp):
default_kfp = ""
default_kfp_text = " (defaults to \"%s\" if available)" % DEFAULT_KNOWN_FALSE_POSITIVES
default_kfp_text += " if available"
parser.add_argument(
"--known-false-positives", default=default_kfp,
help=("suppress known false positives loaded from the given file" + default_kfp_text))
help=f"suppress known false positives loaded from the given file ({default_kfp_text})")

csmock.common.util.add_paired_flag(
parser, "use-login-shell",
Expand Down