Skip to content

Commit

Permalink
chore: keep try/except imports last
Browse files Browse the repository at this point in the history
  • Loading branch information
gforcada committed Oct 14, 2023
1 parent 2edc21a commit 908392a
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions src/plone/rest/errors.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
from AccessControl import getSecurityManager


try:
from plone.app.redirector.interfaces import IRedirectionStorage
except ImportError:
IRedirectionStorage = None
from plone.memoize.instance import memoize
from plone.rest.interfaces import IAPIRequest
from plone.rest.interfaces import ICORSPolicy
Expand All @@ -13,24 +7,28 @@
from urllib.parse import quote
from urllib.parse import unquote
from zExceptions import NotFound
from zope.component import adapter
from zope.component import queryMultiAdapter
from zope.component import queryUtility
from zope.component.hooks import getSite

import json
import sys
import traceback
import urllib


try:
from plone.app.redirector.interfaces import IRedirectionStorage
except ImportError:
IRedirectionStorage = None

try:
from ZPublisher.HTTPRequest import WSGIRequest

HAS_WSGI = True
except ImportError:
HAS_WSGI = False
from zope.component import adapter
from zope.component import queryMultiAdapter
from zope.component import queryUtility
from zope.component.hooks import getSite

import json
import sys
import traceback


@adapter(Exception, IAPIRequest)
Expand Down

0 comments on commit 908392a

Please sign in to comment.