allow kojid to start when not using ssl cert auth

kojid in koji 1.12.0 fails to start when not using ssl cert auth
Traceback (most recent call last):
   File "/usr/sbin/kojid", line 5627, in <module>
     if os.path.isfile(options.cert):
   File "/usr/lib64/python2.7/genericpath.py", line 37, in isfile
     st = os.stat(path)
 TypeError: coercing to Unicode: need string or buffer, NoneType found
if you do not have a cert option defined we should move on. so add
to the if statement a check that the option is actually defined

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
This commit is contained in:
Dennis Gilmore 2017-04-19 14:51:19 -05:00
parent e7854265bd
commit 952465a544

View file

@ -5624,7 +5624,7 @@ if __name__ == "__main__":
#start a session and login
session_opts = koji.grab_session_options(options)
session = koji.ClientSession(options.server, session_opts)
if os.path.isfile(options.cert):
if options.cert and os.path.isfile(options.cert):
try:
# authenticate using SSL client certificates
session.ssl_login(options.cert, None,