mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-19 00:17:51 +02:00
fix integer conversion
This commit is contained in:
@ -53,7 +53,7 @@ Schema:
|
||||
|
||||
Examples:
|
||||
|
||||
$ sfdisk -l | jc --sfdisk -p
|
||||
# sfdisk -l | jc --sfdisk -p
|
||||
[
|
||||
{
|
||||
"disk": "/dev/sda",
|
||||
@ -118,7 +118,7 @@ Examples:
|
||||
}
|
||||
]
|
||||
|
||||
$ sfdisk | jc --sfdisk -p -r
|
||||
# sfdisk | jc --sfdisk -p -r
|
||||
[
|
||||
{
|
||||
"disk": "/dev/sda",
|
||||
|
BIN
jc/man/jc.1.gz
BIN
jc/man/jc.1.gz
Binary file not shown.
@ -216,13 +216,13 @@ def _process(proc_data):
|
||||
for entry in proc_data:
|
||||
for key in entry:
|
||||
if key in int_list:
|
||||
entry[key] = jc.utils.convert_to_int(entry[key])
|
||||
entry[key] = jc.utils.convert_to_int(entry[key].replace('-', ''))
|
||||
|
||||
if 'partitions' in entry:
|
||||
for tp in entry['partitions']:
|
||||
for key in tp:
|
||||
if key in int_list:
|
||||
tp[key] = jc.utils.convert_to_int(tp[key])
|
||||
tp[key] = jc.utils.convert_to_int(tp[key].replace('-', ''))
|
||||
if key in bool_list:
|
||||
tp[key] = jc.utils.convert_to_bool(tp[key])
|
||||
|
||||
|
BIN
man/jc.1.gz
BIN
man/jc.1.gz
Binary file not shown.
Reference in New Issue
Block a user