From b830ce7671a92c150a631218aa275a44e0b7c2fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Mon, 25 Jan 2016 11:19:08 +0200 Subject: [PATCH] api: Fix exception includes --- certidude/api/request.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/certidude/api/request.py b/certidude/api/request.py index 6dff484..fe6fb0a 100644 --- a/certidude/api/request.py +++ b/certidude/api/request.py @@ -4,7 +4,7 @@ import falcon import logging import ipaddress import os -from certidude import config, authority, helpers, push +from certidude import config, authority, helpers, push, errors from certidude.auth import login_required, authorize_admin from certidude.decorators import serialize from certidude.wrappers import Request, Certificate @@ -68,10 +68,10 @@ class RequestListResource(object): # Attempt to save the request otherwise try: csr = authority.store_request(body) - except authority.RequestExists: + except errors.RequestExists: # We should stil redirect client to long poll URL below pass - except authority.DuplicateCommonNameError: + except errors.DuplicateCommonNameError: # TODO: Certificate renewal logger.warning("Rejected signing request with overlapping common name from %s", req.env["REMOTE_ADDR"]) raise falcon.HTTPConflict(