Passed
Push — master ( 842882...dc4417 )
by Humberto
01:37 queued 11s
created

kytos.cli.commands.bug_report.parser   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
eloc 12
dl 0
loc 30
ccs 0
cts 11
cp 0
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A parse() 0 8 2
1
"""kytos - The kytos command line.
2
3
You are at the "bug-report" command.
4
5
Usage:
6
       kytos bug-report
7
       kytos bug-report -h | --help
8
9
Options:
10
11
  -h, --help    Show this screen.
12
"""
13
14
import sys
15
16
from docopt import docopt
17
18
from kytos.cli.commands.bug_report.api import BugReportAPI
19
from kytos.utils.exceptions import KytosException
20
21
22
def parse(argv):
23
    """Parse cli args."""
24
    args = docopt(__doc__, argv=argv)
25
    try:
26
        BugReportAPI.bug_report(args)
27
    except KytosException as exception:
28
        print("Error parsing args: {}".format(exception))
29
        sys.exit(-1)
30