jenkins-bot submitted this change.
[IMPR] use itertools.count in reflinks.py
Change-Id: I7ff4e138a61ea27813367fad503248b21ae93981
---
M scripts/reflinks.py
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/scripts/reflinks.py b/scripts/reflinks.py
index dc437c4..2c4a9d1 100755
--- a/scripts/reflinks.py
+++ b/scripts/reflinks.py
@@ -41,11 +41,13 @@
#
import codecs
import http.client as httplib
+import itertools
import os
import re
import socket
import subprocess
import tempfile
+
from contextlib import suppress
from functools import partial
from http import HTTPStatus
@@ -353,7 +355,7 @@
used_numbers.add(int(number))
# generator to give the next free number
- free_number = (str(i) for i in range(1, 1000) # should be enough
+ free_number = (str(i) for i in itertools.count(start=1)
if i not in used_numbers)
for (g, d) in found_refs.items():
To view, visit change 692862. To unsubscribe, or for help writing mail filters, visit settings.