aboutsummaryrefslogtreecommitdiffstats
path: root/devel/py-pnio-dcp/files/patch-pnio__dcp_pnio__dcp.py
blob: 18e68a4ce8c66503b416e1921a565f508c2d6665 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- pnio_dcp/pnio_dcp.py.orig	2024-02-18 23:53:00 UTC
+++ pnio_dcp/pnio_dcp.py
@@ -49,7 +49,7 @@ class DCP:
     available through this instance.
     """
 
-    def __init__(self, ip):
+    def __init__(self, ip, timeout=7):
         """
         Create a new instance, use the given ip to select the network interface.
         :param ip: The ip address used to select the network interface.
@@ -57,8 +57,8 @@ class DCP:
         """
         self.src_mac, network_interface = self.__get_network_interface_and_mac_address(ip)
 
-        self.default_timeout = 7  # default timeout for requests (in seconds)
-        self.identify_all_timeout = 7  # timeout to receive all responses for identify_all
+        self.default_timeout = timeout  # default timeout for requests (in seconds)
+        self.identify_all_timeout = timeout  # timeout to receive all responses for identify_all
 
         # the XID is the id of the current transaction and can be used to identify the responses to a request
         self.__xid = int(random.getrandbits(32))  # initialize it with a random value