GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

LoadHostCommand.handle()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
dl 0
loc 10
ccs 0
cts 5
cp 0
crap 2
rs 9.4285
1
"""
2
Enarksh
3
4
Copyright 2013-2016 Set Based IT Consultancy
5
6
Licence MIT
7
"""
8
from cleo import Command
9
10
from enarksh.controller.client.LoadHostClient import LoadHostClient
11
from enarksh.style.EnarkshStyle import EnarkshStyle
12
13
14
class LoadHostCommand(Command):
15
    """
16
    Requests the controller to load a host definition
17
18
    load_host
19
        {host.xml : The host definition to load}
20
    """
21
22
    # ------------------------------------------------------------------------------------------------------------------
23
    def handle(self):
24
        """
25
        Executes the load host command.
26
        """
27
        self.output = EnarkshStyle(self.input, self.output)
28
29
        client = LoadHostClient()
30
        ret = client.main(self.input.get_argument('host.xml'))
31
32
        return ret
33
34
# ----------------------------------------------------------------------------------------------------------------------
35