Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cilex-ft opened this issue Sep 29, 2021 · 1 comment · May be fixed by #10
Open

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

cilex-ft opened this issue Sep 29, 2021 · 1 comment · May be fixed by #10

Comments

@cilex-ft
Copy link

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!

@idlogin
Copy link

idlogin commented Apr 24, 2023

yeah. i've tried this on debian11 with python3 and on os x with python 3 and getting the exact same results.

    for xx in summary.split(","):
TabError: inconsistent use of tabs and spaces in indentation   

@bobcarroll bobcarroll linked a pull request May 5, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants