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!
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

15 rindas
326B

  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