Passed
Push — master ( dbd4af...e9c47c )
by Jan
02:33 queued 11s
created

template._mount_option()   A

Complexity

Conditions 2

Size

Total Lines 6
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 5
nop 2
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
import ssg.utils
2
import re
3
4
5
def _mount_option(data, lang):
6
    if lang == "oval":
7
        data["pointid"] = ssg.utils.escape_id(data["mountpoint"])
8
    else:
9
        data["mountoption"] = re.sub(" ", ",", data["mountoption"])
10
    return data
11
12
13
def preprocess(data, lang):
14
    return _mount_option(data, lang)
15