diff options
author | Gerald Combs <gerald@wireshark.org> | 2009-03-02 18:30:16 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2009-03-02 18:30:16 +0000 |
commit | 0028a06052ce50986e379113aeb09a2f7e5cf0f5 (patch) | |
tree | 459ff09d13ad5db717cc1192021d9b7faff8d6cb /tools | |
parent | 2c1c572d08d0f9f8e9ef4800442af3e2c878fd66 (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')
-rwxr-xr-x | tools/make-dissector-reg.py | 7 |
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: |