~ubuntu-branches/ubuntu/utopic/gourmet/utopic

« back to all changes in this revision

Viewing changes to src/lib/plugins/import_export/web_import_plugin/generic_web_importer_plugin.py

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2010-06-07 00:14:10 UTC
  • mfrom: (13.1.5 maverick)
  • Revision ID: james.westby@ubuntu.com-20100607001410-1asehz2hgc5gdk07
* Merge from Debian unstable, remaining changes:
  * debian/control:
    - Recommend python-gtkspell for printing
  * debian/patches/01_fix_raise_str.patch: don't raise str exception
    in src/lib/plugin_gui.py
  * debian/patches/03_dont_remove_nonexistent_plugin.patch: don't
    remove an inactive plugin in plugin_loader.py and don't deactivate
    a plugin from a non-existent database
* Dropped changes, superseded in Debian:
  - Drop forcing of python2.5
  - debian/control: bump Standards-Version to 3.8.3
  - debian/compat: bump to 5
  - debian/control: Depends on python-poppler (needed for printing)
  - add debian/README.source
* Don't set debian/pyversions to 2.5, this is obviously wrong.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
class GenericWebImporter (ImporterPlugin, Pluggable):
7
7
 
8
8
    name = _('Webpage')
9
 
    patterns = ['*.htm','.*.html']
 
9
    patterns = ['*.htm','*.html','*.xhtml']
10
10
    mimetypes = ['text/html','text/xhtml']
11
11
    targets = ['webimport_plugin']
12
12
 
19
19
 
20
20
    def test_file (self, filename):
21
21
        '''Given a file name, test whether the file is of this type.'''
22
 
        if filename.endswith('.htm') or filename.endswith('.html'):
23
 
            return True # We are a fallback option
 
22
        #if filename.endswith('.htm') or filename.endswith('.xhtml') or filename.endswith('.html'):
 
23
        return -1 # We are a fallback option
24
24
 
25
25
    def test_url (self, url, data, content_type):
26
26
        for p in self.plugins: