From 92462c05c9ab1974dcf1cdaafae267077f4db87b Mon Sep 17 00:00:00 2001 From: Stanislaw Adaszewski Date: Fri, 24 Apr 2020 00:19:40 +0200 Subject: [PATCH] randint fix --- jail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jail.py b/jail.py index 5be9d60..d364f87 100644 --- a/jail.py +++ b/jail.py @@ -20,7 +20,7 @@ def command_jail_run(args): base, _ = zfs_snapshot_by_tag_or_sha256(args.image) # root = '/'.join(base.split('/')[:-1]) for _ in range(10**6): - name = bytes([ random.randint(0, 256) for _ in range(4) ]).hex()[:7] + name = bytes([ random.randint(0, 255) for _ in range(4) ]).hex()[:7] name = base.split('/')[0] + '/focker/jails/' + name if not zfs_exists(name): break