mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
py3: Replace useage of im_func
This commit is contained in:
parent
f4cf168a72
commit
a6eb1d79ea
@ -212,7 +212,7 @@ class Device(DeviceConfig, DevicePlugin):
|
||||
|
||||
def can_handle_windows(self, usbdevice, debug=False):
|
||||
from calibre.devices.interface import DevicePlugin
|
||||
if self.can_handle.im_func is DevicePlugin.can_handle.im_func:
|
||||
if self.can_handle.__func__ is DevicePlugin.can_handle.__func__:
|
||||
# No custom can_handle implementation
|
||||
return True
|
||||
# Delegate to the unix can_handle function, creating a unix like
|
||||
|
@ -982,6 +982,7 @@ class BasicNewsRecipe(Recipe):
|
||||
script.extract()
|
||||
for attr in self.remove_attributes:
|
||||
for x in soup.findAll(attrs={attr:True}):
|
||||
print(1111111111, x)
|
||||
del x[attr]
|
||||
for base in list(soup.findAll(['base', 'iframe', 'canvas', 'embed',
|
||||
'command', 'datalist', 'video', 'audio'])):
|
||||
@ -1117,7 +1118,7 @@ class BasicNewsRecipe(Recipe):
|
||||
|
||||
def _fetch_article(self, url, dir_, f, a, num_of_feeds):
|
||||
br = self.browser
|
||||
if self.get_browser.im_func is BasicNewsRecipe.get_browser.im_func:
|
||||
if self.get_browser.__func__ is BasicNewsRecipe.get_browser.__func__:
|
||||
# We are using the default get_browser, which means no need to
|
||||
# clone
|
||||
br = BasicNewsRecipe.get_browser(self)
|
||||
|
Loading…
x
Reference in New Issue
Block a user