From 515462f2a4673b74e3eeb0ee885bf1491030af6d Mon Sep 17 00:00:00 2001 From: Gareth Palmer Date: Sun, 18 Jun 2023 00:46:42 +1200 Subject: [PATCH] Fix pylint warnings. --- .github/workflows/pylint.yml | 1 + setbackground | 8 ++++---- setringtone | 4 ++-- xmlinfo | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 824c6d0..e4f99ea 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -26,6 +26,7 @@ on: - 'xmlinfo' - '.pylintrc' - '.github/workflows/pylint.yml' + workflow_dispatch: jobs: diff --git a/setbackground b/setbackground index c3d40c7..9d80d92 100755 --- a/setbackground +++ b/setbackground @@ -46,8 +46,8 @@ def set_background(hostname, port, timeout, username, password, certificate_file session = requests.Session() session.mount('https://', HTTPSAdapter()) - response = session.post(f'{scheme}://{hostname}:{port}/CGI/Execute', - timeout = timeout, auth = auth, verify = certificate_file, data = {'XML': xml}) + session.post(f'{scheme}://{hostname}:{port}/CGI/Execute', + timeout = timeout, auth = auth, verify = certificate_file, data = {'XML': xml}) except requests.RequestException as error: raise ProgramError(error) @@ -130,7 +130,7 @@ def main(): return if len(arguments) < 1: - raise ProgramError(f'No image provided') + raise ProgramError('No image provided') image = arguments[0] @@ -138,7 +138,7 @@ def main(): raise ProgramError(f'Invalid image: {image}') if len(arguments) < 2: - raise ProgramError(f'No icon provided') + raise ProgramError('No icon provided') icon = arguments[1] diff --git a/setringtone b/setringtone index 0110985..6496067 100755 --- a/setringtone +++ b/setringtone @@ -43,8 +43,8 @@ def set_ringtone(hostname, port, timeout, username, password, certificate_file, session = requests.Session() session.mount('https://', HTTPSAdapter()) - response = session.post(f'{scheme}://{hostname}:{port}/CGI/Execute', - timeout = timeout, auth = auth, verify = certificate_file, data = {'XML': xml}) + session.post(f'{scheme}://{hostname}:{port}/CGI/Execute', + timeout = timeout, auth = auth, verify = certificate_file, data = {'XML': xml}) except requests.RequestException as error: raise ProgramError(error) diff --git a/xmlinfo b/xmlinfo index e804bec..c688f2e 100755 --- a/xmlinfo +++ b/xmlinfo @@ -131,7 +131,7 @@ def main(): return if not len(arguments): - raise ProgramError(f'No mode specified') + raise ProgramError('No mode specified') info = arguments[0]