From cf557684755c919b8786af9e44e6ea6c88811207 Mon Sep 17 00:00:00 2001
From: Nirbheek Chauhan <nirbheek.chauhan@gmail.com>
Date: Tue, 23 Dec 2008 15:46:14 +0530
Subject: [PATCH] Trivial port to GIO (mimetype determination)
---
tests/test_xapianindex.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/test_xapianindex.py b/tests/test_xapianindex.py
index c455c44..5eea363 100644
a
|
b
|
from datetime import datetime |
4 | 4 | |
5 | 5 | import time |
6 | 6 | import unittest |
7 | | import gnomevfs |
| 7 | import gio |
8 | 8 | |
9 | 9 | DEFAULT_STORE = '/tmp/_xi_test' |
10 | 10 | |
… |
… |
DEFAULT_STORE = '/tmp/_xi_test' |
12 | 12 | def index_file(iconn, filepath): |
13 | 13 | """Index a file.""" |
14 | 14 | |
15 | | mimetype = gnomevfs.get_mime_type(filepath) |
| 15 | mimetype = gio.content_type_guess(filepath) |
16 | 16 | main, subtype = mimetype.split('/',1) |
17 | 17 | |
18 | 18 | stat = os.stat(filepath) |