Fixed zfs_get_snapshots hang when filesystems is an empty list
This commit is contained in:
@ -164,6 +164,7 @@ return[filesystem_name]=[ "snashot1", "snapshot2", ... ]
|
|||||||
"""
|
"""
|
||||||
def zfs_get_snapshots(ssh_to, filesystems, backup_name):
|
def zfs_get_snapshots(ssh_to, filesystems, backup_name):
|
||||||
|
|
||||||
|
if filesystems:
|
||||||
snapshots=run(ssh_to=ssh_to, input="\0".join(filesystems), valid_exitcodes=[ 0,1 ], cmd=
|
snapshots=run(ssh_to=ssh_to, input="\0".join(filesystems), valid_exitcodes=[ 0,1 ], cmd=
|
||||||
[ "xargs", "-0", "-n", "1", "zfs", "list", "-d", "1", "-r", "-t" ,"snapshot", "-H", "-o", "name" ]
|
[ "xargs", "-0", "-n", "1", "zfs", "list", "-d", "1", "-r", "-t" ,"snapshot", "-H", "-o", "name" ]
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user