Passed
Pull Request — 2.x (#1911)
by Jordi
12:55 queued 07:53
created

senaite.core.migration.utils   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 8
dl 0
loc 13
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A copyPermMap() 0 7 2
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