Skip to content

Commit 73e9411

Browse files
committed
...
1 parent 3874316 commit 73e9411

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mechanize/_form_controls.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ def isstringlike(x):
7272
def choose_boundary():
7373
"""Return a string usable as a multipart boundary."""
7474
# follow IE and firefox
75-
nonce = "".join(str(random.randint(0, 2**31 - 1)) for i in (0, 1, 2))
75+
limit = (1 << 31) - 1
76+
nonce = "".join(str(random.randint(0, limit)) for i in (0, 1, 2))
7677
return "-" * 27 + nonce
7778

7879

0 commit comments

Comments
 (0)