diff options
author | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2012-09-17 20:37:39 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2012-09-17 20:37:39 +0000 |
commit | 73c0fa86f99c498eb180803b3891bcc3fa2809c5 (patch) | |
tree | 433ba7240e9df0a767f8408957584c84365bd8a4 /tools/make-dissector-reg.py | |
parent | cc4e2d3566fd71c186ec5ac29c336896e133bd06 (diff) |
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
Diffstat (limited to 'tools/make-dissector-reg.py')
-rwxr-xr-x | tools/make-dissector-reg.py | 7 |
1 files changed, 4 insertions, 3 deletions
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") |