aboutsummaryrefslogtreecommitdiffstats
path: root/tools/make-dissector-reg.py
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2013-12-01 01:35:13 +0000
committerGerald Combs <gerald@wireshark.org>2013-12-01 01:35:13 +0000
commit80b4bc004aa4f870942bac2466085a0271e8455b (patch)
tree606443715bfd3890ba9d9546ed38be0e43963855 /tools/make-dissector-reg.py
parente30fd2f989dd6b2c20257133b0d5ebad596c0ad2 (diff)
Fix compatibility with Python 2.5. Tested with 2.5, 2.6, 2.7, and 3.3.
svn path=/trunk/; revision=53683
Diffstat (limited to 'tools/make-dissector-reg.py')
-rwxr-xr-xtools/make-dissector-reg.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/make-dissector-reg.py b/tools/make-dissector-reg.py
index c5d07a481f..35a39bfeb5 100755
--- a/tools/make-dissector-reg.py
+++ b/tools/make-dissector-reg.py
@@ -69,14 +69,15 @@ else:
#
if registertype == "dissectorsinfile":
try:
- with open(sys.argv[3]) as f:
- files = [line.rstrip() for line in f]
+ dissector_f = open(sys.argv[3])
except IOError:
print(("Unable to open input file '%s'" % sys.argv[3]))
sys.exit(1)
+
+ files = [line.rstrip() for line in dissector_f]
else:
files = sys.argv[3:]
-
+
# Create the proper list of filenames
filenames = []
for file in files: