Merge "Fix compatibility with Pint 0.5"
This commit is contained in:
commit
d009b2e4f3
@ -82,7 +82,7 @@ def get_nodes_memory_info(numa_node_dirs):
|
|||||||
# To get memory size with unit from memory info line
|
# To get memory size with unit from memory info line
|
||||||
# Memory info sample line format 'Node 0 MemTotal: 1560000 kB'
|
# Memory info sample line format 'Node 0 MemTotal: 1560000 kB'
|
||||||
value = line.split(":")[1].strip()
|
value = line.split(":")[1].strip()
|
||||||
memory_kb = int(UNIT_CONVERTER(value).to_base_units())
|
memory_kb = int(UNIT_CONVERTER(value).to_base_units().magnitude)
|
||||||
except (ValueError, IndexError, pint.UndefinedUnitError) as exc:
|
except (ValueError, IndexError, pint.UndefinedUnitError) as exc:
|
||||||
msg = ('Failed to get memory information for %(node)s: '
|
msg = ('Failed to get memory information for %(node)s: '
|
||||||
'%(error)s' % {'node': numa_node_dir, 'error': exc})
|
'%(error)s' % {'node': numa_node_dir, 'error': exc})
|
||||||
|
5
releasenotes/notes/pint-0.5-816aaf3a4f6d4a6e.yaml
Normal file
5
releasenotes/notes/pint-0.5-816aaf3a4f6d4a6e.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Fixes the ``numa-topology`` inspection collector to be compatible with
|
||||||
|
Pint < 0.5.2.
|
Loading…
x
Reference in New Issue
Block a user