Skip to content

Commit bb2b67f

Browse files
herheliukrst0git
andcommitted
pycriu: making sk_name optional
so user can just call criu.use_sk() without any parameters to use the default socket Co-authored-by: Radostin Stoyanov <[email protected]> Signed-off-by: Andrii Herheliuk <[email protected]>
1 parent ae971c9 commit bb2b67f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/pycriu/criu.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import pycriu.rpc_pb2 as rpc
1010

11+
CR_DEFAULT_SERVICE_ADDRESS = "./criu_service.socket"
1112

1213
class _criu_comm:
1314
"""
@@ -213,7 +214,7 @@ def __init__(self):
213214
self.opts = rpc.criu_opts()
214215
self.sk = None
215216

216-
def use_sk(self, sk_name):
217+
def use_sk(self, sk_name=CR_DEFAULT_SERVICE_ADDRESS):
217218
"""
218219
Access criu using unix socket which that belongs to criu service daemon.
219220
"""

0 commit comments

Comments
 (0)