|
|
|
@ -30,10 +30,10 @@ import getpass
|
|
|
|
|
from types import StringType
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
from magic2 import open as type_file, MAGIC_NONE as MAGIC_NONE
|
|
|
|
|
from magic import open as type_file, MAGIC_NONE as MAGIC_NONE
|
|
|
|
|
except ImportError:
|
|
|
|
|
try:
|
|
|
|
|
from magic2 import open as type_file, NONE as MAGIC_NONE
|
|
|
|
|
from magic import open as type_file, NONE as MAGIC_NONE
|
|
|
|
|
except:
|
|
|
|
|
type_file = None
|
|
|
|
|
MAGIC_NONE = None
|
|
|
|
@ -97,7 +97,7 @@ class proxy_type_file:
|
|
|
|
|
if processFile.success():
|
|
|
|
|
return processFile.read().rstrip()
|
|
|
|
|
else:
|
|
|
|
|
processFile = process("file","-b",filename)
|
|
|
|
|
processFile = process("file","-bz",filename)
|
|
|
|
|
if processFile.success():
|
|
|
|
|
return processFile.read().rstrip()
|
|
|
|
|
return None
|
|
|
|
|