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!
소스 검색

Protect against spaces in tags

tags/0.92
부모
커밋
0d3ff335ab
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. +4
    -0
      zfs.py

+ 4
- 0
zfs.py 파일 보기

@@ -123,6 +123,8 @@ def zfs_snapshot_by_sha256(sha256, focker_type='image'):
def zfs_tag(name, tags, replace=False):
if any(map(lambda a: ' ' in a, tags)):
raise ValueError('Tags cannot contain spaces')
lst = zfs_parse_output(['zfs', 'list', '-o', 'focker:tags', '-H', name])
if not replace:
tags = list(tags)
@@ -136,6 +138,8 @@ def zfs_tag(name, tags, replace=False):
def zfs_untag(tags, focker_type='image'):
if any(map(lambda a: ' ' in a, tags)):
raise ValueError('Tags cannot contain spaces')
# print('zfs_untag(), tags:', tags)
poolname = zfs_poolname()
lst = zfs_parse_output(['zfs', 'list', '-o', 'name,focker:tags', '-H', '-r', poolname + '/focker/' + focker_type + 's'])


불러오는 중...
취소
저장