Passed
Pull Request — 2.x (#1933)
by Ramon
05:15
created

senaite.core.scripts.utils   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 11
dl 0
loc 15
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A setup_site() 0 6 1
1
# -*- coding: utf-8 -*-
2
3
from zope.component.hooks import setSite
4
from zope.event import notify
5
from zope.globalrequest import setRequest
6
from zope.traversing.interfaces import BeforeTraverseEvent
7
8
9
def setup_site(site):
10
    setSite(site)
11
    site.clearCurrentSkin()
12
    site.setupCurrentSkin(site.REQUEST)
13
    notify(BeforeTraverseEvent(site, site.REQUEST))
14
    setRequest(site.REQUEST)
15