blob: 5e0f231af5a4d30c1f04bed98d9e0454fc8ab245 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
## 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
|