Deprecate use of captcha-old.py

Bug: T357930
Change-Id: I69a2e68d430d7a5769fb8b4391f1163ee99ad8fb
This commit is contained in:
Reedy 2024-02-19 19:03:49 +00:00
parent be305ed8a5
commit 86af079ed9
2 changed files with 4 additions and 1 deletions

View file

@ -352,6 +352,8 @@ if __name__ == "__main__":
else: else:
sys.exit("Need to specify the location of a font") sys.exit("Need to specify the location of a font")
print("captcha-old.py is deprecated and will be removed in the future!")
badwordlist = read_wordlist(opts.badwordlist) badwordlist = read_wordlist(opts.badwordlist)
count = opts.count count = opts.count
fill = opts.fill fill = opts.fill

View file

@ -55,7 +55,7 @@ class GenerateFancyCaptchas extends Maintenance {
); );
$this->addOption( $this->addOption(
"oldcaptcha", "oldcaptcha",
"Whether to use captcha-old.py which doesn't have OCR fighting improvements" "DEPRECATED: Whether to use captcha-old.py which doesn't have OCR fighting improvements"
); );
$this->addOption( "delete", "Deletes all the old captchas" ); $this->addOption( "delete", "Deletes all the old captchas" );
$this->addOption( "threads", "The number of threads to use to generate the images", $this->addOption( "threads", "The number of threads to use to generate the images",
@ -111,6 +111,7 @@ class GenerateFancyCaptchas extends Maintenance {
$captchaScript = 'captcha.py'; $captchaScript = 'captcha.py';
if ( $this->hasOption( 'oldcaptcha' ) ) { if ( $this->hasOption( 'oldcaptcha' ) ) {
$this->output( "Using --oldcaptcha is deprecated, and captcha-old.py will be removed in the future!" );
$captchaScript = 'captcha-old.py'; $captchaScript = 'captcha-old.py';
} }