From 55c9c711d165d6d2a0e432b57a2986fa8160512e Mon Sep 17 00:00:00 2001 From: Taka Date: Mon, 20 Jul 2020 09:07:49 +0000 Subject: [PATCH] Reworked some code to keep pylint happy. --- vasl_templates/webapp/vo_utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vasl_templates/webapp/vo_utils.py b/vasl_templates/webapp/vo_utils.py index 950f2c6..2740950 100644 --- a/vasl_templates/webapp/vo_utils.py +++ b/vasl_templates/webapp/vo_utils.py @@ -306,8 +306,10 @@ def _make_comments( vo_entry, nat, vo_type, disabled_note_ids ): #pylint: disabl orig_note_id = note_id force_auto_comment = False nat2 = nat - nat_type = globvars.template_pack[ "nationalities" ].get( nat, {} ).get( "type" ) \ - if globvars.template_pack else None + if globvars.template_pack: + nat_type = globvars.template_pack[ "nationalities" ].get( nat, {} ).get( "type" ) + else: + nat_type = None if nat in ( "kfw-uro", "kfw-bcfk", "kfw-un-common" ): nat2 = "kfw-un" elif nat in ( "kfw-kpa", "kfw-cpva" ):