mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
b15a675540
commit
328f51c7ce
@ -13,7 +13,7 @@ from textwrap import dedent
|
||||
|
||||
color_row_key = '*row'
|
||||
|
||||
class Rule(object): # {{{
|
||||
class Rule(object): # {{{
|
||||
|
||||
SIGNATURE = '# BasicColorRule():'
|
||||
|
||||
@ -56,7 +56,7 @@ class Rule(object): # {{{
|
||||
def template(self):
|
||||
if not self.color or not self.conditions:
|
||||
return None
|
||||
conditions = map(self.apply_condition, self.conditions)
|
||||
conditions = [x for x in map(self.apply_condition, self.conditions) if x is not None]
|
||||
conditions = (',\n' + ' '*9).join(conditions)
|
||||
return dedent('''\
|
||||
program:
|
||||
@ -248,4 +248,3 @@ def migrate_old_rule(fm, template):
|
||||
rules.append(r.template)
|
||||
return rules
|
||||
return [template]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user