#2246 deprecated warning for cli option --ca as well
Merged 2 years ago by tkopecek. Opened 2 years ago by julian8628.
julian8628/koji fix-issue-2182  into  master

file modified
+3
@@ -150,6 +150,9 @@ 

                        help=_("list commands"))

      (options, args) = parser.parse_args()

  

+     if options.ca:

+         koji.util.deprecated("--ca option is deprecated and will be removed in 1.24")

+ 

      # load local config

      try:

          result = koji.read_config(options.profile, user_config=options.configFile)

file modified
+1 -1
@@ -1915,7 +1915,7 @@ 

              result[name] = os.path.expanduser(result[name])

  

      if result.get('ca'):

-         util.deprecated("--ca option is deprecated and will be removed in 1.24")

+         util.deprecated("ca option in config file is deprecated and will be removed in 1.24")

  

      return result

  

Metadata Update from @julian8628:
- Pull-request tagged with: testing-ready

2 years ago

What is the problem here? It works for me without this change?

  • I'm not losing that message for other tools/configs.

if executing koji --ca abc hello, because the old code only checks the config result from config file, if there's no ca option in koji profile, the msg won't be shown.

I'm not losing that message for other tools/configs.

not -> now?

1 new commit added

  • warning for both cli and config file option
2 years ago

updated, to show the deprecated msg for both cli and config file

Metadata Update from @jcupova:
- Pull-request tagged with: testing-done

2 years ago

Commit 743c3bd fixes this pull-request

Pull-Request has been merged by tkopecek

2 years ago