mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Make the utility classes function available in calibre
This commit is contained in:
parent
9d47c150cb
commit
da5359a617
@ -33,6 +33,12 @@ from polyglot.builtins import unicode_type, string_or_bytes, getcwd
|
|||||||
from polyglot.urllib import urlparse, urlsplit
|
from polyglot.urllib import urlparse, urlsplit
|
||||||
|
|
||||||
|
|
||||||
|
def classes(classes):
|
||||||
|
q = frozenset(classes.split(' '))
|
||||||
|
return dict(attrs={
|
||||||
|
'class': lambda x: x and frozenset(x.split()).intersection(q)})
|
||||||
|
|
||||||
|
|
||||||
class LoginFailed(ValueError):
|
class LoginFailed(ValueError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user