[pitivi] Fix pylint undefined-loop-variable
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] Fix pylint undefined-loop-variable
- Date: Mon, 11 Nov 2019 22:07:35 +0000 (UTC)
commit c0883f7bfa77a5607554aa0c681311b5e4ad5910
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Fri Nov 1 07:35:23 2019 +0100
Fix pylint undefined-loop-variable
pitivi/utils/validate.py | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/pitivi/utils/validate.py b/pitivi/utils/validate.py
index 1673dd22..056d4dbc 100644
--- a/pitivi/utils/validate.py
+++ b/pitivi/utils/validate.py
@@ -202,12 +202,14 @@ def get_edge(structure):
def _release_button_if_needed(scenario, timeline, container, layer_prio,
position, y):
- try:
- next_actions = scenario.get_actions()
- for next_action in next_actions[1:]:
- if next_action.type not in ["wait", "add-layer"]:
- break
- except KeyError:
+ next_actions = scenario.get_actions()
+ if len(next_actions) == 1:
+ return
+ next_action = None
+ for next_action in next_actions[1:]:
+ if next_action.type not in ["wait", "add-layer"]:
+ break
+ if not next_action:
return
need_release = True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]