mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Apparently python 3.4+ removes the __func__ attribute, sigh
This commit is contained in:
parent
ac2a83d82a
commit
7270eaa91f
@ -251,6 +251,7 @@ class DevicePlugin(Plugin):
|
||||
'''
|
||||
|
||||
return True
|
||||
can_handle.is_base_class_implementation = True
|
||||
|
||||
def open(self, connected_device, library_uuid):
|
||||
'''
|
||||
|
@ -211,8 +211,7 @@ class Device(DeviceConfig, DevicePlugin):
|
||||
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 @@ class BasicNewsRecipe(Recipe):
|
||||
|
||||
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 @@ class CalibrePeriodical(BasicNewsRecipe):
|
||||
' the calibre Periodicals service.'))
|
||||
|
||||
return br
|
||||
get_browser.is_base_class_implementation = True
|
||||
|
||||
def download(self):
|
||||
self.log('Fetching downloaded recipe')
|
||||
|
Loading…
x
Reference in New Issue
Block a user