Hook up get_from_file_name
This commit is contained in:
parent
c89de594d3
commit
2145de1039
@ -1,2 +1 @@
|
||||
|
||||
|
||||
from sugar.objects import mime
|
||||
|
@ -1,4 +1,8 @@
|
||||
from sugar import _sugarext
|
||||
try:
|
||||
from sugar import _sugarext
|
||||
except ImportError:
|
||||
from sugar import ltihooks
|
||||
from sugar import _sugarext
|
||||
|
||||
def get_from_filename(filename):
|
||||
return _sugarext.get_mime_type_from_filename(filename)
|
||||
def get_from_file_name(file_name):
|
||||
return _sugarext.get_mime_type_from_file_name(file_name)
|
||||
|
@ -16,6 +16,6 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
from sugar import objects
|
||||
from sugar.objects import mime
|
||||
|
||||
print objects.mime.get_from_filename('test.pdf')
|
||||
print mime.get_from_file_name('test.pdf')
|
||||
|
Loading…
Reference in New Issue
Block a user