aboutsummaryrefslogtreecommitdiffstats
path: root/tools/make-dissector-reg.py
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2009-03-02 18:30:16 +0000
committerGerald Combs <gerald@wireshark.org>2009-03-02 18:30:16 +0000
commit0028a06052ce50986e379113aeb09a2f7e5cf0f5 (patch)
tree459ff09d13ad5db717cc1192021d9b7faff8d6cb /tools/make-dissector-reg.py
parent2c1c572d08d0f9f8e9ef4800442af3e2c878fd66 (diff)
Add a version to register-cache.pkl and use it to rebuild the cache from
scratch when needed. svn path=/trunk/; revision=27577
Diffstat (limited to 'tools/make-dissector-reg.py')
-rwxr-xr-xtools/make-dissector-reg.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/make-dissector-reg.py b/tools/make-dissector-reg.py
index 14ee83d7b8..e1ceee3df6 100755
--- a/tools/make-dissector-reg.py
+++ b/tools/make-dissector-reg.py
@@ -17,6 +17,9 @@ import re
import pickle
from stat import *
+VERSION_KEY = '_VERSION'
+CUR_VERSION = '$Id'
+
#
# The first argument is the directory in which the source files live.
#
@@ -96,8 +99,10 @@ if cache_filename:
cache_file = open(cache_filename, 'rb')
cache = pickle.load(cache_file)
cache_file.close()
+ if not cache.has_key(VERSION_KEY) or cache[VERSION_KEY] != CUR_VERSION:
+ cache = {VERSION_KEY: CUR_VERSION}
except:
- cache = {}
+ cache = {VERSION_KEY: CUR_VERSION}
# Grep
for filename in filenames: