IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an email to s dot adaszewski at gmail dot com. User accounts are meant only to report issues and/or generate pull requests. This is a purpose-specific Git hosting for ADARED projects. Thank you for your understanding!
浏览代码

Small improvement

tags/0.92
父节点
当前提交
c90bd1bf16
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. +3
    -2
      zfs.py

+ 3
- 2
zfs.py 查看文件

@@ -22,8 +22,9 @@ def zfs_get_type(name):
return lst[0][1]
def zfs_snapshot_by_tag_or_sha256(s):
lst = zfs_parse_output(['zfs', 'list', '-o', 'focker:sha256,focker:tags,type,name', '-H', '-t', 'snapshot'])
def zfs_snapshot_by_tag_or_sha256(s, focker_type='image'):
lst = zfs_parse_output(['zfs', 'list', '-o', 'focker:sha256,focker:tags,type,name',
'-H', '-t', 'snapshot', '-r', poolname + '/focker/' + focker_type + 's'])
lst = list(filter(lambda a: (a[0] == s or s in a[1].split(' ')) and a[2] == 'snapshot', lst))
if len(lst) == 0:
raise ValueError('Reference not found: ' + s)


正在加载...
取消
保存