From c26bc96440cdd2903c8eace750fcd89d1e0385e6 Mon Sep 17 00:00:00 2001 From: Sérgio M. Basto Date: Apr 14 2019 01:33:31 +0000 Subject: Fix for rhbz #1412260 Return None in _open_cert when ~/.fedora.upn exist is not correct, i.e. we can read cert if we delete ~/.fedora.upn ? With latest commits we already have enough warnings that fedora does not use client certificate anymore, but if other external repos try to use this code, the code works instead have an traceback error. Signed-off-by: Sérgio M. Basto --- diff --git a/src/fedora_cert/__init__.py b/src/fedora_cert/__init__.py index 32ad625..9982883 100644 --- a/src/fedora_cert/__init__.py +++ b/src/fedora_cert/__init__.py @@ -29,8 +29,6 @@ def _open_cert(): Read in the certificate so we dont duplicate the code """ # Make sure we can even read the thing. - if os.path.exists(os.path.expanduser('~/.fedora.upn')): - return None cert_file = os.path.join(os.path.expanduser('~'), ".fedora.cert") if not os.access(cert_file, os.R_OK): raise fedora_cert_error("""!!! cannot read your ~/.fedora.cert file !!!