From 7fb99b57085560172077068fa7cb53d6f7c07577 Mon Sep 17 00:00:00 2001 From: ccremers Date: Thu, 3 Mar 2005 11:47:53 +0000 Subject: [PATCH] - Improved protocollist lib. --- test/protocollist.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/test/protocollist.py b/test/protocollist.py index 214bfaf..5c1b346 100644 --- a/test/protocollist.py +++ b/test/protocollist.py @@ -1,6 +1,13 @@ # # protocol list # +# +def list_ppfix(list, prefix, postfix): + newlist = [] + for i in list: + newlist.append(prefix + i + postfix) + return newlist + def from_literature(): list = [ \ "andrew-ban.spdl", @@ -35,7 +42,7 @@ def from_literature(): "yahalom-paulson.spdl", "yahalom.spdl" ] - return list + return list_ppfix(list, "../spdl/","") def from_others(): list = [ \ @@ -57,7 +64,8 @@ def from_others(): "simplest.spdl", "speedtest.spdl", "unknown2.spdl"] - return list + + return list_ppfix(list, "../spdl/","") def select(type): list = from_literature() @@ -65,9 +73,6 @@ def select(type): # 0 means all protocols list = list + from_others() - # modify path - for i in range(0, len(list)): - list[i] = "../spdl/" + list[i] return list