Skip to content

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Miroshnychenko committed Apr 7, 2024
1 parent e06fae1 commit db2e2e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion plugin.video.external.library/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

import logging
import sys

import xbmc
Expand All @@ -23,6 +23,7 @@
from libs.kodi_service import GettextEmulator, initialize_logging

initialize_logging()
logger = logging.getLogger(__name__)
_ = GettextEmulator.gettext


Expand Down
6 changes: 4 additions & 2 deletions plugin.video.external.library/libs/exception_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ def format_exception(exc_obj: Optional[Exception] = None) -> str:


@contextmanager
def catch_exception(logger_func: Callable[[str], None] = logger.error) -> Generator[None, None, None]:
def catch_exception(
logger_func: Callable[[str], None] = logger.error
) -> Generator[None, None, None]:
"""
Diagnostic helper context manager
Expand Down Expand Up @@ -186,7 +188,7 @@ def catch_exception(logger_func: Callable[[str], None] = logger.error) -> Genera
try:
yield
except Exception as exc:
message = format_exception(exc)
message = format_exception(exc) # pylint: disable=logging-not-lazy
# pylint: disable=line-too-long
logger_func('\n*********************************** Unhandled exception detected ***********************************\n'
+ message)
Expand Down

0 comments on commit db2e2e6

Please sign in to comment.