From 828a8c32d5ad8b2ad56397ca9b91a0de7802c9be Mon Sep 17 00:00:00 2001 From: Kiooeht Date: Sun, 22 May 2011 18:01:16 -0700 Subject: [PATCH] Apply prefix/suffix quirks in the correct order + don't just pick a random prefix/suffix --- dataobjs.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/dataobjs.py b/dataobjs.py index a81cd2e..7d5b927 100644 --- a/dataobjs.py +++ b/dataobjs.py @@ -143,14 +143,10 @@ class pesterQuirks(object): string = q.apply(string, first=(i==0), last=lastStr) else: string = q.apply(string) - if i == 0: - if len(prefix) >= 1: - myprefix = random.choice(prefix) - string = myprefix.apply(string) - if lastStr: - if len(suffix) >= 1: - mysuffix = random.choice(suffix) - string = mysuffix.apply(string) + elif q.type == 'prefix' and i == 0: + string = q.apply(string) + elif q.type == 'suffix' and lastStr: + string = q.apply(string) newlist.append(string) final = []