Merge branch 'python2' into 'main'
fix: support python2 fail2ban Closes #14 See merge request hectorjsmith/fail2ban-prometheus-exporter!48
This commit is contained in:
commit
4be463a7c8
@ -59,7 +59,7 @@ func (s *Fail2BanSocket) read() (interface{}, error) {
|
|||||||
unpickler := pickle.NewUnpickler(bufReader)
|
unpickler := pickle.NewUnpickler(bufReader)
|
||||||
|
|
||||||
unpickler.FindClass = func(module, name string) (interface{}, error) {
|
unpickler.FindClass = func(module, name string) (interface{}, error) {
|
||||||
if module == "builtins" && name == "str" {
|
if (module == "builtins" || module == "__builtin__") && name == "str" {
|
||||||
return &Py_builtins_str{}, nil
|
return &Py_builtins_str{}, nil
|
||||||
}
|
}
|
||||||
return nil, fmt.Errorf("class not found: " + module + " : " + name)
|
return nil, fmt.Errorf("class not found: " + module + " : " + name)
|
||||||
|
Loading…
Reference in New Issue
Block a user