diff options
author | Leonard Richardson <leonardr@segfault.org> | 2019-11-11 11:41:01 -0500 |
---|---|---|
committer | Leonard Richardson <leonardr@segfault.org> | 2019-11-11 11:41:01 -0500 |
commit | 32ccfa3f458c3542569ece5bdcd88513e42a6fe0 (patch) | |
tree | 1b69a02aa5f59bf0f1413aaf2159a768fd789d50 /bs4 | |
parent | 64753365df3bedd60cde505db792abb20841ada4 (diff) | |
parent | 17ca4508af1ee8ad739b4cf8319e2313c91c5c86 (diff) |
Fixed a deprecation warning on Python 3.7. Patch by Colin
Watson. [bug=1847592]
Diffstat (limited to 'bs4')
-rw-r--r-- | bs4/element.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bs4/element.py b/bs4/element.py index 2001ad5..8684870 100644 --- a/bs4/element.py +++ b/bs4/element.py @@ -163,7 +163,7 @@ class PageElement(object): c = XMLFormatter else: c = HTMLFormatter - if callable(formatter): + if isinstance(formatter, Callable): return c(entity_substitution=formatter) return c.REGISTRY[formatter] |