From 6b1558eb6222beb654ee04775f984c06b79b03b6 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 6 Jun 1998 15:50:21 +0000 Subject: Eliminate `target'. svn path=/trunk/; revision=1921 --- fetchmailconf | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/fetchmailconf b/fetchmailconf index 98e9e57d..54d74154 100755 --- a/fetchmailconf +++ b/fetchmailconf @@ -463,20 +463,19 @@ class MyWidget: # Common methods for Tkinter widgets -- deals with Tkinter declaration def post(self, template, field): for x in template.typemap: - target = "self." + x[0] source = "self." + field + "." + x[0] if x[1] == 'Boolean': - exec target + " = BooleanVar(self)" + setattr(self, x[0], BooleanVar(self)) if eval(source): - exec target + ".set(" + source + ")" + exec "self." + x[0] + ".set(" + source + ")" elif x[1] == 'String': - exec target + " = StringVar(self)" + setattr(self, x[0], StringVar(self)) if eval(source): - exec target + ".set(" + source + ")" + exec "self." + x[0] + ".set(" + source + ")" elif x[1] == 'Int': - exec target + " = IntVar(self)" + setattr(self, x[0], IntVar(self)) if eval(source): - exec target + ".set(" + source + ")" + exec "self." + x[0] + ".set(" + source + ")" def fetch(self, template, field): for x in template.typemap: -- cgit v1.2.3