mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2026-04-24 20:56:11 +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