#1612 use right top limit
Merged 4 years ago by mikem. Opened 4 years ago by tkopecek.
tkopecek/koji issue1611  into  master

file modified
+1 -1
@@ -5560,7 +5560,7 @@ 

      if secrets:

          return secrets.token_hex(nbytes=nbytes)

      else:

-         values = ['%02x' % random.randint(0, 256) for x in range(nbytes)]

+         values = ['%02x' % random.randint(0, 255) for x in range(nbytes)]

          return ''.join(values)

  

  

randint's top limit is included in range, so original value 256 can be
reached and as such hex-digit 100 is emitted enlarging the string.

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

4 years ago

rebased onto 07f0cba

4 years ago

update: added link to issue in commit message

Commit badb40d fixes this pull-request

Pull-Request has been merged by mikem

4 years ago

Metadata Update from @mfilip:
- Pull-request tagged with: testing-done

4 years ago