[meld/ci-fixes] filediff: Fix a minor flake8 complaint
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld/ci-fixes] filediff: Fix a minor flake8 complaint
- Date: Sat, 6 Aug 2022 07:13:10 +0000 (UTC)
commit 78bae2e96156af757285077a18fc526e55be89e7
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat Aug 6 17:11:51 2022 +1000
filediff: Fix a minor flake8 complaint
This was a complaint about assert spacing, but we may as well make
these actual checks.
meld/filediff.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index 5a686c6d..f12d3601 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -970,9 +970,13 @@ class FileDiff(Gtk.VBox, MeldDoc):
@with_focused_pane
def action_delete_change(self, pane, *args):
+ if self.cursor.chunk is None:
+ return
+
chunk = self.linediffer.get_chunk(self.cursor.chunk, pane)
- assert(self.cursor.chunk is not None)
- assert(chunk is not None)
+ if chunk is None:
+ return
+
self.delete_chunk(pane, chunk)
def _synth_chunk(self, pane0, pane1, line):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]