Merge "python3: long does not exist in python 3"

This commit is contained in:
Zuul 2017-12-14 03:51:21 +00:00 committed by Gerrit Code Review
commit 8351d7277a
1 changed files with 3 additions and 1 deletions

View File

@ -19,6 +19,7 @@
import logging
from oslo_utils import units
from six.moves import builtins
from django.conf import settings
from django.core.urlresolvers import reverse
@ -123,7 +124,8 @@ class IndexView(tables.DataTableView):
invalid_msg = ('API query is not valid and is ignored: '
'%(field)s=%(string)s')
try:
filter_string = long(float(filter_string) * (units.Mi))
filter_string = builtins.int(float(filter_string)
* (units.Mi))
if filter_string >= 0:
filters[filter_field] = filter_string
else: