mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-01 04:46:08 +01:00
Apparently python 3.4+ removes the __func__ attribute, sigh
This commit is contained in:
parent
ac2a83d82a
commit
7270eaa91f
3 changed files with 4 additions and 3 deletions
|
|
@ -251,6 +251,7 @@ def can_handle(self, device_info, debug=False):
|
|||
'''
|
||||
|
||||
return True
|
||||
can_handle.is_base_class_implementation = True
|
||||
|
||||
def open(self, connected_device, library_uuid):
|
||||
'''
|
||||
|
|
|
|||
|
|
@ -211,8 +211,7 @@ def windows_sort_drives(self, drives):
|
|||
return drives
|
||||
|
||||
def can_handle_windows(self, usbdevice, debug=False):
|
||||
from calibre.devices.interface import DevicePlugin
|
||||
if self.can_handle.__func__ is DevicePlugin.can_handle.__func__:
|
||||
if hasattr(self.can_handle, 'is_base_class_implementation'):
|
||||
# No custom can_handle implementation
|
||||
return True
|
||||
# Delegate to the unix can_handle function, creating a unix like
|
||||
|
|
|
|||
|
|
@ -1117,7 +1117,7 @@ def feed2index(self, f, feeds):
|
|||
|
||||
def _fetch_article(self, url, dir_, f, a, num_of_feeds):
|
||||
br = self.browser
|
||||
if self.get_browser.__func__ is BasicNewsRecipe.get_browser.__func__:
|
||||
if hasattr(self.get_browser, 'is_base_class_implementation'):
|
||||
# We are using the default get_browser, which means no need to
|
||||
# clone
|
||||
br = BasicNewsRecipe.get_browser(self)
|
||||
|
|
@ -1787,6 +1787,7 @@ def get_browser(self):
|
|||
' the calibre Periodicals service.'))
|
||||
|
||||
return br
|
||||
get_browser.is_base_class_implementation = True
|
||||
|
||||
def download(self):
|
||||
self.log('Fetching downloaded recipe')
|
||||
|
|
|
|||
Loading…
Reference in a new issue