Fix for work with file-5.05.

develop
Mike Hiretsky 13 years ago
parent ce042b4391
commit 00083321b3

@ -28,7 +28,11 @@ import re
import sys
import getpass
from types import StringType
import magic as type_file
try:
from magic import open as type_file, MAGIC_NONE as MAGIC_NONE
except ImportError:
from magic import open as type_file, NONE as MAGIC_NONE
import cl_lang
tr = cl_lang.lang()
@ -73,7 +77,7 @@ class typeFile:
"""Получение типа файла"""
def __init__(self, magic=0x410):
self.magicObject = type_file.open(type_file.MAGIC_NONE)
self.magicObject = type_file(MAGIC_NONE)
self.magicObject.load()
self.magicObject.setflags(magic)

Loading…
Cancel
Save