Fix some formatting
This commit is contained in:
parent
4adebb0adc
commit
aa12747469
1 changed files with 3 additions and 3 deletions
|
@ -11,9 +11,9 @@ def docker_info():
|
||||||
raw_info = getoutput('docker ps')
|
raw_info = getoutput('docker ps')
|
||||||
# Header: "CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES" (with way more spaces)
|
# Header: "CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES" (with way more spaces)
|
||||||
header = raw_info[:raw_info.find('\n')+1]
|
header = raw_info[:raw_info.find('\n')+1]
|
||||||
header_indices = {'CONTAINER ID': header.find('CONTAINER ID'), 'IMAGE': header.find('IMAGE'), 'COMMAND': header.find('COMMAND'), \
|
header_indices = {'CONTAINER ID': header.find('CONTAINER ID'), 'IMAGE': header.find('IMAGE'), \
|
||||||
'CREATED': header.find('CREATED'), \
|
'COMMAND': header.find('COMMAND'), 'CREATED': header.find('CREATED'), 'STATUS': header.find('STATUS'), \
|
||||||
'STATUS': header.find('STATUS'), 'PORTS': header.find('PORTS'), 'NAMES': header.find('NAMES')}
|
'PORTS': header.find('PORTS'), 'NAMES': header.find('NAMES')}
|
||||||
|
|
||||||
# Remove header (example above)
|
# Remove header (example above)
|
||||||
raw_info = raw_info[raw_info.find('\n')+1:]
|
raw_info = raw_info[raw_info.find('\n')+1:]
|
||||||
|
|
Loading…
Reference in a new issue