From 73c0fa86f99c498eb180803b3891bcc3fa2809c5 Mon Sep 17 00:00:00 2001 From: Jeff Morriss Date: Mon, 17 Sep 2012 20:37:39 +0000 Subject: Unique-ify the list of dissector registration and handoff functions while we sort them. Avoids the double registration problem discussed on -dev today. Note: the sorted() call requires Python 2.4+ but I think that's OK now. svn path=/trunk/; revision=44952 --- tools/make-dissector-reg.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tools/make-dissector-reg.py') diff --git a/tools/make-dissector-reg.py b/tools/make-dissector-reg.py index e579c69a8f..6f1efabcfa 100755 --- a/tools/make-dissector-reg.py +++ b/tools/make-dissector-reg.py @@ -177,9 +177,10 @@ if len(regs['proto_reg']) < 1: sys.exit(1) # Sort the lists to make them pretty -regs['proto_reg'].sort() -regs['handoff_reg'].sort() -regs['wtap_register'].sort() +# Unique-ify the lists to avoid double registrations +regs['proto_reg'] = sorted(set(regs['proto_reg'])) +regs['handoff_reg'] = sorted(set(regs['handoff_reg'])) +regs['wtap_register'] = sorted(set(regs['wtap_register'])) reg_code = open(tmp_filename, "w") -- cgit v1.2.3