Passed
Pull Request — 2.x (#1911)
by Ramon
04:47
created

senaite.core.migration.utils.copyPermMap()   A

Complexity

Conditions 2

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 2
nop 1
1
# -*- coding: utf-8 -*-
2
3
from Persistence import PersistentMapping
4
5
6
def copyPermMap(old):
7
    """bullet proof copy
8
    """
9
    new = PersistentMapping()
10
    for k, v in old.items():
11
        new[k] = v
12
    return new
13