From 6ea451a44e0b9a0819f91f49639401e6fb632a2d Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Oct 14 2016 21:44:39 +0000 Subject: Do not send a certificate if none exists This means that if the user has no cert, pyrpkg will not warn them and just use gssapi. Signed-off-by: Patrick Uiterwijk --- diff --git a/fedpkg/__init__.py b/fedpkg/__init__.py index 0fae271..42d68ef 100644 --- a/fedpkg/__init__.py +++ b/fedpkg/__init__.py @@ -106,7 +106,11 @@ class Commands(pyrpkg.Commands): We override this from pyrpkg because we actually need a client-side certificate. """ - return os.path.expanduser('~/.fedora.cert') + path = os.path.expanduser('~/.fedora.cert') + if os.path.exists(path): + return path + else: + return None @cached_property def ca_cert(self):