Merge "FancyCaptcha: Remove deprecated blacklist parameter"

This commit is contained in:
jenkins-bot 2024-01-29 16:43:36 +00:00 committed by Gerrit Code Review
commit 578a11b779
3 changed files with 3 additions and 16 deletions

View file

@ -291,12 +291,6 @@ if __name__ == "__main__":
metavar="FILE",
default=os.path.join(script_dir, "badwordlist"),
)
parser.add_option(
"--blacklist",
help="DEPRECATED: list of words that should not be used",
metavar="FILE",
default=os.path.join(script_dir, "blacklist"),
)
parser.add_option(
"--fill",
help="Fill the output directory to contain N files, overrides count, cannot be used with --dirs",
@ -358,7 +352,7 @@ if __name__ == "__main__":
else:
sys.exit("Need to specify the location of a font")
badwordlist = read_wordlist(opts.blacklist) + read_wordlist(opts.badwordlist)
badwordlist = read_wordlist(opts.badwordlist)
count = opts.count
fill = opts.fill
fontsize = opts.font_size

View file

@ -321,12 +321,6 @@ if __name__ == "__main__":
metavar="FILE",
default=os.path.join(script_dir, "badwordlist"),
)
parser.add_option(
"--blacklist",
help="DEPRECATED: list of words that should not be used",
metavar="FILE",
default=os.path.join(script_dir, "blacklist"),
)
parser.add_option(
"--fill",
help="Fill the output directory to contain N files, overrides count, cannot be used with --dirs",
@ -388,7 +382,7 @@ if __name__ == "__main__":
else:
sys.exit("Need to specify the location of a font")
badwordlist = read_wordlist(opts.blacklist) + read_wordlist(opts.badwordlist)
badwordlist = read_wordlist(opts.badwordlist)
count = opts.count
fill = opts.fill
fontsize = opts.font_size

View file

@ -48,7 +48,6 @@ class GenerateFancyCaptchas extends Maintenance {
$this->addOption( "font", "The font to use", true, true );
$this->addOption( "font-size", "The font size ", false, true );
$this->addOption( "badwordlist", "A list of words that should not be used", false, true );
$this->addOption( "blacklist", "DEPRECATED: A list of words that should not be used", false, true );
$this->addOption( "fill", "Fill the captcha container to N files", true, true );
$this->addOption(
"verbose",
@ -128,7 +127,7 @@ class GenerateFancyCaptchas extends Maintenance {
$wgCaptchaDirectoryLevels
];
foreach (
[ 'wordlist', 'font', 'font-size', 'blacklist', 'badwordlist', 'verbose', 'threads' ] as $par
[ 'wordlist', 'font', 'font-size', 'badwordlist', 'verbose', 'threads' ] as $par
) {
if ( $this->hasOption( $par ) ) {
$cmd[] = "--$par";