Skip to content

Commit

Permalink
Fix pylint warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
gareth-palmer committed Jun 17, 2023
1 parent 2023023 commit 515462f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ on:
- 'xmlinfo'
- '.pylintrc'
- '.github/workflows/pylint.yml'

workflow_dispatch:

jobs:
Expand Down
8 changes: 4 additions & 4 deletions setbackground
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -130,15 +130,15 @@ def main():
return

if len(arguments) < 1:
raise ProgramError(f'No image provided')
raise ProgramError('No image provided')

image = arguments[0]

if not re.search(r'(?x) ^ https?:// ', image):
raise ProgramError(f'Invalid image: {image}')

if len(arguments) < 2:
raise ProgramError(f'No icon provided')
raise ProgramError('No icon provided')

icon = arguments[1]

Expand Down
4 changes: 2 additions & 2 deletions setringtone
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion xmlinfo
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit 515462f

Please sign in to comment.