Skip to content

Commit

Permalink
Fix pylint errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
gareth-palmer committed May 13, 2024
1 parent 905f72a commit 3bbfd34
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 14 deletions.
5 changes: 1 addition & 4 deletions authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
# This program is free software, distributed under the terms of
# the GNU General Public License Version 2.

import os.path
import re

from flask import Blueprint, Response, request, g
from flask import Blueprint, Response, request
import config


Expand Down
3 changes: 0 additions & 3 deletions directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# This program is free software, distributed under the terms of
# the GNU General Public License Version 2.

import os.path
import re
from math import ceil
from urllib.parse import quote_plus
Expand Down Expand Up @@ -181,8 +180,6 @@ def directory_menuitem():
def before_request():
g.is_79xx = re.search(r'(?x) ^ CP-79', request.headers.get('X-CiscoIPPhoneModelName', ''))

return None


@blueprint.errorhandler(Exception)
def error_handler(error):
Expand Down
8 changes: 5 additions & 3 deletions information.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
# This program is free software, distributed under the terms of
# the GNU General Public License Version 2.

import os.path
import re
from html import escape

from lxml import etree
from flask import Blueprint, Response, request, g
import config
from flask import Blueprint, Response, request


blueprint = Blueprint('information', __name__)
Expand All @@ -24,6 +22,10 @@ def help_information():
return Response('Invalid id', mimetype = 'text/plain'), 500

document = etree.parse('./phone_help.xml')

if not document:
return Response('XML error', mimetype = 'text/plain'), 500

element = document.find(f'HelpItem[ID="{id}"]')

if element:
Expand Down
1 change: 0 additions & 1 deletion problem_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# This program is free software, distributed under the terms of
# the GNU General Public License Version 2.

import os.path
import re
from datetime import datetime

Expand Down
3 changes: 0 additions & 3 deletions services.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# This program is free software, distributed under the terms of
# the GNU General Public License Version 2.

import os.path
import re
from urllib.parse import quote_plus
from html import escape
Expand Down Expand Up @@ -109,8 +108,6 @@ def parked_calls():
def before_request():
g.is_79xx = re.search(r'(?x) ^ CP-79', request.headers.get('X-CiscoIPPhoneModelName', ''))

return None


@blueprint.errorhandler(Exception)
def error_handler(error):
Expand Down

0 comments on commit 3bbfd34

Please sign in to comment.