|
|
|
@ -32,13 +32,16 @@ from types import StringType
|
|
|
|
|
import tarfile
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
from magic import open as type_file, MAGIC_NONE as MAGIC_NONE
|
|
|
|
|
from magic import (open as type_file, MAGIC_NONE as MAGIC_NONE,
|
|
|
|
|
MAGIC_CONTINUE)
|
|
|
|
|
except ImportError:
|
|
|
|
|
try:
|
|
|
|
|
from magic import open as type_file, NONE as MAGIC_NONE
|
|
|
|
|
from magic import (open as type_file, NONE as MAGIC_NONE,
|
|
|
|
|
CONTINUE as MAGIC_CONTINUE)
|
|
|
|
|
except:
|
|
|
|
|
type_file = None
|
|
|
|
|
MAGIC_NONE = None
|
|
|
|
|
MAGIC_CONTINUE = None
|
|
|
|
|
|
|
|
|
|
import cl_lang
|
|
|
|
|
tr = cl_lang.lang()
|
|
|
|
@ -99,7 +102,7 @@ class proxy_type_file:
|
|
|
|
|
if processFile.success():
|
|
|
|
|
return processFile.read().rstrip()
|
|
|
|
|
else:
|
|
|
|
|
processFile = process("file","-bz",filename)
|
|
|
|
|
processFile = process("file","-bkz",filename)
|
|
|
|
|
if processFile.success():
|
|
|
|
|
return processFile.read().rstrip()
|
|
|
|
|
return None
|
|
|
|
|