[PATCH 03 of 52 Narval cube] [new style] use range instead of xrange

Nsukami Patrick ptrck at nskm.xyz
Wed Apr 1 11:34:03 CEST 2020


# HG changeset patch
# User Nsukami Patrick <ptrck at nskm dot xyz>
# Date 1585406238 0
#      Sat Mar 28 14:37:18 2020 +0000
# Node ID 1dc8712c2f95c94c06570307df74a975d5b70ea6
# Parent  daeb22255d9c55be7d4a135925a679ba63240cc3
[new style] use range instead of xrange

diff --git a/cubicweb_narval/narvalbot/server.py b/cubicweb_narval/narvalbot/server.py
--- a/cubicweb_narval/narvalbot/server.py
+++ b/cubicweb_narval/narvalbot/server.py
@@ -131,7 +131,7 @@
                 except OSError:
                     pass
             self._cvar.notify()
-        for i in xrange(5):
+        for i in range(5):
             time.sleep(1)
             with self._cvar:
                 if not self._running_tasks:
diff --git a/cubicweb_narval/views/startplan.py b/cubicweb_narval/views/startplan.py
--- a/cubicweb_narval/views/startplan.py
+++ b/cubicweb_narval/views/startplan.py
@@ -83,7 +83,7 @@
 
     def call(self, priority=MEDIUM):
         priority = priority or self._cw.form.get('priority', MEDIUM)
-        for i in xrange(self.cw_rset.rowcount):
+        for i in range(self.cw_rset.rowcount):
             try:
                 self.cell_call(i, 0, priority=priority)
             except ValidationError:




More information about the cubicweb-devel mailing list