Fix out of bounds issue

This commit is contained in:
Felix Niederwanger 2021-05-20 09:51:16 +02:00
parent fa1ed995c3
commit 90c35c5f16
Signed by: phoenix
GPG key ID: 31860289A704FB3C

View file

@ -39,6 +39,6 @@ if __name__ == "__main__" :
for i in range(n) :
for j in range(c) :
hostname = hostnames[random.randint(0, len(hostnames))]
hostname = hostnames[random.randint(0, len(hostnames)-1)]
sys.stdout.write("%-20s" % (hostname))
sys.stdout.write("\n")
sys.stdout.write("\n")