#246 Revert "default krb_rdns to True"
Merged 7 years ago by mikem. Opened 7 years ago by till.
till/koji koji_gc  into  master

file modified
+4 -1
@@ -52,6 +52,8 @@ 

      parser.add_option("--principal", help=_("specify a Kerberos principal to use"))

      parser.add_option("--krbservice", default="host",

                        help=_("the service name of the principal being used by the hub"))

+     parser.add_option("--krb-rdns", action="store_true", default=False,

+                       help=_("get reverse dns FQDN for krb target"))

      parser.add_option("--runas", metavar="USER",

                        help=_("run as the specified user (requires special privileges)"))

      parser.add_option("--user", help=_("specify user"))
@@ -111,6 +113,7 @@ 

      (options, args) = parser.parse_args()

  

      defaults = parser.get_default_values()

+ 

      config = ConfigParser.ConfigParser()

      cf = getattr(options, 'config_file', None)

      if cf:
@@ -131,7 +134,7 @@ 

              ['keytab', None, 'string'],

              ['principal', None, 'string'],

              ['krbservice', None, 'string'],

-             ['krb_rdns', True, 'boolean'],

+             ['krb_rdns', None, 'boolean'],

              ['runas', None, 'string'],

              ['user', None, 'string'],

              ['password', None, 'string'],

This reverts commit 02128ee.

The second column in cfgmap is an alias and "True" is not a valid alias.
It was mistaken in the reverted commit as a default value, which it is
not. Reverting this commit should fix the following traceback that
koji-gc in Fedora currenty raises:

Traceback (most recent call last):
File "/usr/sbin/koji-gc", line 901, in <module>
options, args = get_options()
File "/usr/sbin/koji-gc", line 159, in get_options
if config.has_option(*alias):
TypeError: has_option() argument after * must be a sequence, not bool

1 new commit added

  • koji-gc: Set default value for krb_rdns to True
7 years ago

2 new commits added

  • koji-gc: Set default value for krb_rdns to False
  • Revert "default krb_rdns to True"
7 years ago

2 new commits added

  • koji-gc: Set default value for krb_rdns to False
  • Revert "default krb_rdns to True"
7 years ago

Can you also expand comment (line 129), so it is more clear, that values in list are aliases' names, not the default values? Just to have it in same PR.

Commit 5da75e1 fixes this pull-request

Pull-Request has been merged by mikem@redhat.com

7 years ago

Thank you - the better comment is a good idea, I filed #257 for this.

Metadata