Created
March 30, 2011 16:57
-
-
Save jbowes/894799 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def append(self, path, certlist): | |
try: | |
cert = self.cls() | |
cert.read(path) | |
bogus = cert.bogus() | |
if bogus: | |
bogus.insert(0, _('Reason(s):')) | |
raise Exception('\n - '.join(bogus)) | |
certlist.append(cert) | |
except Exception, e: | |
log.exception(e) | |
log.error( | |
'File: %s, not loaded\n%s', | |
path, | |
e) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
12:53 < alikins> what is line 435 in certificate.py doing?
12:53 < alikins> it's raising an Exception in a try block with a except: Exception
12:59 < jbowes> that's what we call the montebello else
12:59 < jbowes> it short-circuits the following call to append
13:00 < jbowes> but since it's using an exception instead of an else, it's faster.
13:00 < jbowes> scales better for the tight loop that append is in.