return highlight(contents, lexer, formatter).encode(
gdb.host_charset(), "backslashreplace"
)
- except:
+ except Exception:
return None
class HandleNasmComments(TokenMergeFilter):
flavor = gdb.parameter("disassembly-flavor")
if flavor == "intel" and gdbarch.name()[:4] == "i386":
lexer_type = "nasm"
- except:
+ except Exception:
# If GDB is built without i386 support then attempting to fetch
# the 'disassembly-flavor' parameter will throw an error, which we
# ignore.
lexer = __get_asm_lexer(gdbarch)
formatter = get_formatter()
return highlight(content, lexer, formatter).rstrip().encode()
- except:
+ except Exception:
return content
except ImportError: