One more 2to3 baby step

This commit is contained in:
Miroslav Stampar
2019-01-22 02:29:52 +01:00
parent 7074365f8e
commit 2c270ed250
10 changed files with 20 additions and 20 deletions

View File

@@ -29,7 +29,7 @@ class ProgressBar(object):
def _convertSeconds(self, value):
seconds = value
minutes = seconds / 60
minutes = seconds // 60
seconds = seconds - (minutes * 60)
return "%.2d:%.2d" % (minutes, seconds)

View File

@@ -58,7 +58,7 @@ class xrange(object):
return self._len()
def _len(self):
return max(0, int((self.stop - self.start) / self.step))
return max(0, int((self.stop - self.start) // self.step))
def __contains__(self, value):
return (self.start <= value < self.stop) and (value - self.start) % self.step == 0