mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 13:27:09 +02:00
https://github.com/dpaleino/syslog-summary Summarize the contents of a syslog log file / useful with logcheck Patched to support: - new thread safe version of python-magic - socklog
17 lines
501 B
Diff
17 lines
501 B
Diff
## use the new thread safe version of python-magic not the original ##
|
|
|
|
--- syslog-summary-1.14/syslog-summary
|
|
+++ syslog-summary-1.14/syslog-summary.new
|
|
@@ -130,9 +130,8 @@
|
|
"""Returns True if the filename is a gzipped compressed file"""
|
|
try:
|
|
import magic
|
|
- ms = magic.open(magic.MAGIC_NONE)
|
|
- ms.load()
|
|
- if re.search("^gzip compressed data.*", ms.file(filename)):
|
|
+ ms = magic.from_file(filename)
|
|
+ if re.search("^gzip compressed data.*", ms):
|
|
return True
|
|
else:
|
|
return False
|