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!
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

1234567891011121314
  1. import random
  2. from .zfs import zfs_exists
  3. def random_sha256_hexdigest():
  4. return bytes([ random.randint(0, 255) for _ in range(32) ]).hex()
  5. def find_prefix(head, tail):
  6. for pre in range(7, len(tail)):
  7. name = head + tail[:pre]
  8. if not zfs_exists(name):
  9. break
  10. return name