diff --git a/jc/parsers/ls.py b/jc/parsers/ls.py index ad985a2f..24a8d841 100644 --- a/jc/parsers/ls.py +++ b/jc/parsers/ls.py @@ -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))