[PATCH 16/21] lookaside: Check if a file already was uploaded

Ralph Bean rbean at redhat.com
Wed May 6 14:23:49 UTC 2015


On Wed, May 06, 2015 at 01:53:12PM +0200, Mathieu Bridon wrote:
> +            if self.client_cert is not None:
> +                if os.path.exists(self.client_cert):
> +                    c.setopt(pycurl.SSLCERT, self.client_cert)
> +                else:
> +                    self.log.warn("Missing certificate: %s"
> +                                  % self.client_cert)
> +
> +            if self.ca_cert is not None:
> +                if os.path.exists(self.ca_cert):
> +                    c.setopt(pycurl.CAINFO, self.ca_cert)
> +                else:
> +                    self.log.warn("Missing certificate: %s" % self.ca_cert)

Hm, I think that these two ``log.warn`` statements should probably be
raised exceptions.

If I'm reading this right, in the previous commit you provide an
interface for users of the library to override properties to define
their own client certs and ca certs.  If they use that and specify
those paths explicitly, but they don't exist on disk, that warrants
more than just a warning (which might get swallowed up by someone's
incorrectly configured logging somewhere).  An outright exception that
stops execution is due.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/rel-eng/attachments/20150506/7da081a8/attachment.sig>


More information about the rel-eng mailing list