Skip to content

Commit ddcd89a

Browse files
Fix #430
1 parent 1da0346 commit ddcd89a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

datajoint/autopopulate.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import traceback
55
import random
66
from tqdm import tqdm
7-
from itertools import count
87
from pymysql import OperationalError
98
from .relational_operand import RelationalOperand, AndList, U
109
from . import DataJointError
@@ -117,7 +116,7 @@ def handler(signum, frame):
117116
elif order == "random":
118117
random.shuffle(keys)
119118

120-
call_count = count()
119+
call_count = 0
121120
logger.info('Found %d keys to populate' % len(keys))
122121

123122
make = self._make_tuples if hasattr(self, '_make_tuples') else self.make
@@ -133,7 +132,7 @@ def handler(signum, frame):
133132
jobs.complete(self.target.table_name, self._job_key(key))
134133
else:
135134
logger.info('Populating: ' + str(key))
136-
next(call_count)
135+
call_count += 1
137136
try:
138137
make(dict(key))
139138
except (KeyboardInterrupt, SystemExit, Exception) as error:

0 commit comments

Comments
 (0)