Completed
Push0c1aa2...328aed
passed — Build
created

_decode()   A

↳ Parent: Project

Complexity

Conditions 2

Duplication

Lines 0
Ratio 0 %

Size

Total Lines 5

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
1
def _decode(string, encoding='utf8'):
2
    if hasattr(string, 'decode'):
3
        return string.decode(encoding)
4
5
    return string
6
7
8