This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix string formatting in exception raise


Hi,

The attached patch fixes a string formatting issue when raising a
SyntaxError in gdb/python/lib/gdb/command/xmethods.py.

Regards,
Daniel

diff --git gdb/python/lib/gdb/command/xmethods.py gdb/python/lib/gdb/command/xmethods.py
index 46f7b6..cadf5c 100644
--- gdb/python/lib/gdb/command/xmethods.py
+++ gdb/python/lib/gdb/command/xmethods.py
@@ -24,7 +24,7 @@ def validate_xm_regexp(part_name, regexp):
     try:
         return re.compile(regexp)
     except SyntaxError:
-        raise SyntaxError("Invalid %s regexp: %s", part_name, regexp)
+        raise SyntaxError("Invalid %s regexp: %s" % (part_name, regexp))
 
 
 def parse_xm_command_args(arg):

Attachment: 0x78F1337C.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]