[stable-4] Fix pylint errors (#5939)

Fix pylint errors (#5933)

* Fix pylint errors.

* Also adjust to https://github.com/ansible/ansible/pull/79909.

(cherry picked from commit b1d9507cd2)
This commit is contained in:
Felix Fontein 2023-02-04 17:28:18 +01:00 committed by GitHub
parent a7783c48ff
commit bbe74d2b17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 10 additions and 7 deletions

View file

@ -355,6 +355,7 @@ class NosystemdTimezone(Timezone):
def __init__(self, module):
super(NosystemdTimezone, self).__init__(module)
# Validate given timezone
planned_tz = ''
if 'name' in self.value:
tzfile = self._verify_timezone()
planned_tz = self.value['name']['planned']