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.
Passed
Push — master ( fac2c4...4a4d5a )
by P.R.
03:39
created

NodeActionMessage.__init__()   B

Complexity

Conditions 1

Size

Total Lines 38

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 38
ccs 0
cts 7
cp 0
crap 2
rs 8.8571
1
"""
2
Enarksh
3
4
Copyright 2013-2016 Set Based IT Consultancy
5
6
Licence MIT
7
"""
8
from enarksh.message.Message import Message
9
from enarksh.message.MessageController import MessageController
0 ignored issues
show
Unused Code introduced by
Unused MessageController imported from enarksh.message.MessageController
Loading history...
10
11
12
class NodeActionMessage(Message):
13
    """
14
    Message type for requesting a node action made through the CLI application.
15
    """
16
    MESSAGE_TYPE = 'controller:NodeActionMessage'
17
    """
18
    The message type.
19
20
    :type: str
21
    """
22
23
    # ------------------------------------------------------------------------------------------------------------------
24
    def __init__(self, uri, act_id, mail_on_completion, mail_on_error):
25
        """
26
        Object constructor.
27
28
        :param str uri: The URI of the (trigger) node that must be triggered.
29
        :param int act_id: The ID of the requested action.
30
        :param bool mail_on_completion: If True the user wants to receive a mail when the schedule has completed.
31
        :param bool mail_on_error: If True the user wants to receive a mail when an error occurs.
32
        """
33
        Message.__init__(self, NodeActionMessage.MESSAGE_TYPE)
34
35
        self.uri = uri
36
        """
37
        The URI of the (trigger) node that must be triggered.
38
39
        :type: str
40
        """
41
42
        self.act_id = act_id
43
        """
44
        The ID of the requested action.
45
46
        :type: int
47
        """
48
49
        self.mail_on_completion = mail_on_completion
50
        """
51
        If True the user wants to receive a mail when the schedule has completed.
52
53
        :type: bool
54
        """
55
56
        self.mail_on_error = mail_on_error
57
        """
58
        If True the user wants to receive a mail when an error occurs.
59
60
        :type: bool
61
        """
62
63
    # ------------------------------------------------------------------------------------------------------------------
64
    def send_message(self, end_point):
65
        """
66
        Sends the message to an end point.
67
68
        :param str end_point: The end point.
69
70
        :rtype: None
71
        """
72
        self.message_controller.send_message(end_point, self)
73
74
75
# ----------------------------------------------------------------------------------------------------------------------
76