type() method should be replaced with isinstance() in nova/utils.py
Bug #1267300 reported by
lizheming
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
lizheming |
Bug Description
In nova/utils.py, a func use the "type" method to determine the type. It's bertter to use the "isinstance" method instead.
The code is:
def convert_
try:
if type(version) == str:
version = convert_
if type(version) == tuple:
return reduce(lambda x, y: (x * 1000) + y, version)
except Exception:
raise exception.
this bug is fixed in glance:
https:/
Changed in nova: | |
assignee: | nobody → lizheming (lizheming-li) |
description: | updated |
Changed in nova: | |
milestone: | none → icehouse-3 |
Changed in nova: | |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | icehouse-3 → 2014.1 |
To post a comment you must log in.
Fix proposed to branch: master /review. openstack. org/65856
Review: https:/