Skip to content

Commit

Permalink
Avoid to use embedded assignment syntax (Closes: #998744)
Browse files Browse the repository at this point in the history
  • Loading branch information
qykth-git committed Nov 16, 2021
1 parent 95496a5 commit 9552607
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
calibre (5.12.0+dfsg-1+deb11u1) bullseye; urgency=medium

* Avoid to use embedded assignment syntax (Closes: #998744)

-- YOKOTA Hiroshi <yokota.hgml@gmail.com> Tue, 16 Nov 2021 08:37:45 +0900

calibre (5.12.0+dfsg-1) unstable; urgency=medium

* New upstream version 5.12.0+dfsg
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
From: YOKOTA Hiroshi <yokota.hgml@gmail.com>
Date: Tue, 9 Nov 2021 23:56:51 +0900
Subject: Avoid to use embedded assignment syntax (Closes: #998744)

Forwarded: not-needed

This error was also reported at:
https://bugs.launchpad.net/calibre/+bug/1942463

Fixes are:
https://github.com/kovidgoyal/calibre/commit/884839a691e800e56e185e10019a66b12feea640
and
https://github.com/kovidgoyal/calibre/commit/ed32130ca4cbbf235f5560e7c53f78c01eab1106
---
src/calibre/utils/formatter.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/calibre/utils/formatter.py b/src/calibre/utils/formatter.py
index 83f2a00..18d1afd 100644
--- a/src/calibre/utils/formatter.py
+++ b/src/calibre/utils/formatter.py
@@ -656,7 +656,8 @@ class _Interpreter(object):

def do_node_first_non_empty(self, prog):
for expr in prog.expression_list:
- if v := self.expr(expr):
+ v = self.expr(expr)
+ if v:
return v
return ''

1 change: 1 addition & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
0008-Don-t-change-book-file-unless-user-s-consent-Closes-.patch
0009-dont-use-python-crypto.patch
0010-Restore-chardet-module-support.patch
0011-Avoid-to-use-embedded-assignment-syntax-Closes-99874.patch

0 comments on commit 9552607

Please sign in to comment.