[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] [metrics-utils/master 1/2] Fix parsing bug in exonerator.py, too.
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Fri, 12 Nov 2010 19:58:53 +0100
Subject: Fix parsing bug in exonerator.py, too.
Commit: 4571b24ee421770326aeea4b6936b4a6f4ae82e0
---
exonerator/exonerator.py | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/exonerator/exonerator.py b/exonerator/exonerator.py
index 641d65e..22b8335 100755
--- a/exonerator/exonerator.py
+++ b/exonerator/exonerator.py
@@ -264,6 +264,16 @@ if __name__ == '__main__':
line = descriptorFile.readline()
continue
if targetPort and rulePort != "*" and \
+ rulePort.find("-") > -1:
+ fromPort = int(rulePort.split("-")[0])
+ toPort = int(rulePort.split("-")[1])
+ if int(targetPort) < fromPort or \
+ int(targetPort) > toPort:
+ # port not contained in interval
+ line = descriptorFile.readline()
+ continue
+ if targetPort and rulePort != "*" and \
+ rulePort.find("-") == -1 and \
targetPort != rulePort:
# ports do not match
line = descriptorFile.readline()
--
1.7.1