summaryrefslogtreecommitdiff
path: root/odoo/addons/test_limits
diff options
context:
space:
mode:
authorxmo-odoo <xmo@odoo.com>2017-04-27 13:59:33 +0200
committerGitHub <noreply@github.com>2017-04-27 13:59:33 +0200
commit2e6a589f417af48e3322955ffff6e94b6d8a24e3 (patch)
treeaa613ecc1f74a9531a03de89aa2bdc7bb32eed3b /odoo/addons/test_limits
parentde4a2216b953abb86094c9bfa5f45b1eaaa79d3d (diff)
[FIX] builtins removed from Python 3
* Reverse wrapper courtesy of @rco-odoo's original P3 branch * thin compat module stripped down from werkzeug (to augment as needed) issue 8530
Diffstat (limited to 'odoo/addons/test_limits')
-rw-r--r--odoo/addons/test_limits/models.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/odoo/addons/test_limits/models.py b/odoo/addons/test_limits/models.py
index f46402857cf..506578a811b 100644
--- a/odoo/addons/test_limits/models.py
+++ b/odoo/addons/test_limits/models.py
@@ -2,8 +2,10 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import time
+import sys
from odoo import models, api
+from odoo.tools import pycompat
class m(models.Model):
""" This model exposes a few methods that will consume between 'almost no
@@ -37,7 +39,7 @@ class m(models.Model):
t0 = time.clock()
t1 = time.clock()
while t1 - t0 < seconds:
- for i in xrange(10000000):
+ for i in pycompat.range(10000000):
x = i * i
t1 = time.clock()
return True