pycriu: set default value for sk_name

This change allows users to call criu.use_sk() without any
parameters to use the default socket name.

Co-authored-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
Signed-off-by: Andrii Herheliuk <andrii@herheliuk.com>
This commit is contained in:
Andrii Herheliuk 2025-10-27 21:57:41 +00:00 committed by Andrei Vagin
parent d2c46b92b0
commit 71a637923f

View file

@ -8,6 +8,7 @@ import struct
import pycriu.rpc_pb2 as rpc
CR_DEFAULT_SERVICE_ADDRESS = "./criu_service.socket"
class _criu_comm:
"""
@ -213,7 +214,7 @@ class criu:
self.opts = rpc.criu_opts()
self.sk = None
def use_sk(self, sk_name):
def use_sk(self, sk_name=CR_DEFAULT_SERVICE_ADDRESS):
"""
Access criu using unix socket which that belongs to criu service daemon.
"""