mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2026-06-09 21:09:03 +02:00
fix blank output case in ls
This commit is contained in:
+3
-2
@@ -92,8 +92,9 @@ def parse(data):
|
||||
linedata = data.splitlines()
|
||||
|
||||
# Delete first line if it starts with 'total'
|
||||
if linedata[0].find('total') == 0:
|
||||
linedata.pop(0)
|
||||
if linedata:
|
||||
if linedata[0].find('total') == 0:
|
||||
linedata.pop(0)
|
||||
|
||||
# Clear any blank lines
|
||||
cleandata = list(filter(None, linedata))
|
||||
|
||||
Reference in New Issue
Block a user