From: Mark Hymers Date: Wed, 26 Dec 2007 18:01:19 +0000 (+0000) Subject: * ud-useradd: Avoid a TypeError exception when constructing the template X-Git-Tag: userdir-ldap-0.3.16~18^2 X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=commitdiff_plain;h=3ec1386cd62200a1d86fc72168c2aa1fe305bdd8 * ud-useradd: Avoid a TypeError exception when constructing the template filename --- diff --git a/debian/changelog b/debian/changelog index 382e859..b53129e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,8 +16,10 @@ userdir-ldap (0.3.15+xxx) XXunstable; urgency=low * ud-userimport, ud-groupadd, ud-roleadd, ud-useradd, userdir_ldap.py: Update ud-userimport to use the same objectClasses as ud-{user,group,role}add and abstract them out into userdir_ldap.py + * ud-useradd: Avoid a TypeError exception when constructing the template + filename - -- Mark Hymers Wed, 26 Dec 2007 17:56:28 +0000 + -- Mark Hymers Wed, 26 Dec 2007 18:00:08 +0000 userdir-ldap (0.3.15) unstable; urgency=low diff --git a/ud-useradd b/ud-useradd index e0c30e9..8cc425b 100755 --- a/ud-useradd +++ b/ud-useradd @@ -306,7 +306,7 @@ if Update == 1 and ForceMail == 0: # Send the Welcome message print "Sending Welcome Email" -Reply = TemplateSubst(Subst,open(TemplatesDir+"/welcome-message-"+gidNumber,"r").read()); +Reply = TemplateSubst(Subst,open(TemplatesDir + "/welcome-message-%d" % gidNumber, "r").read()) Child = os.popen("/usr/sbin/sendmail -t","w"); #Child = os.popen("cat","w"); Child.write(Reply);