From 1c9ca43e12a9c09c94b87d1c494823b3c5d7798a Mon Sep 17 00:00:00 2001 From: David Faure Date: Sun, 13 Dec 2020 11:50:46 +0100 Subject: Fix errors in python code, found by pylama in a strict CI --- find-modules/sip_generator.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'find-modules/sip_generator.py') diff --git a/find-modules/sip_generator.py b/find-modules/sip_generator.py index 2dd2ef11..b8418649 100644 --- a/find-modules/sip_generator.py +++ b/find-modules/sip_generator.py @@ -12,12 +12,10 @@ import argparse import gettext import inspect import logging -import os -import re import sys import traceback from clang import cindex -from clang.cindex import AccessSpecifier, AvailabilityKind, CursorKind, SourceRange, StorageClass, TokenKind, TypeKind, TranslationUnit +from clang.cindex import AccessSpecifier, AvailabilityKind, CursorKind, SourceRange, TokenKind, TypeKind, TranslationUnit import rules_engine @@ -784,7 +782,7 @@ def main(argv=None): body, includes = g.create_sip(args.source, args.include_filename) with open(args.output, "w") as outputFile: outputFile.write(body) - except Exception as e: + except Exception: tbk = traceback.format_exc() print(tbk) return -1 -- cgit v1.2.1