Skip to content

Tabs and indentation errors prevent modsec-log-parser working with python3 #9

Open
@cilex-ft

Description

@cilex-ft

Ubuntu 20.04 installs python3 by default.

When executing modsec-log-parser.py, error is raised:

File "./modsec-log-parser.py", line 50
    for xx in summary.split(","):
                                ^
TabError: inconsistent use of tabs and spaces in indentation

I tried to solve the error by replacing tabs with spaces, to no avail:

sed 's/\t/    /g' modsec-log-parser.py > modsec-log-parser.py3 

./modsec-log-parser.py3  --summary="uri,id,msg" /var/log/modsec_audit.log
  File "./modsec-log-parser.py3", line 62
    print str(i)
    ^
IndentationError: expected an indented block

Please fix these indentations!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions