[Da-tools-commits] r357 ./da-tools/userdir-ldap-common: * ud-useradd: Avoid a TypeError exception when constructing the template

Mark Hymers mark at hymers.org.uk
Wed Dec 26 18:01:19 UTC 2007


------------------------------------------------------------
revno: 357
committer: Mark Hymers <mark at hymers.org.uk>
branch nick: userdir-ldap-common
timestamp: Wed 2007-12-26 18:01:19 +0000
message:
  * ud-useradd: Avoid a TypeError exception when constructing the template
    filename
modified:
  debian/changelog
  ud-useradd
-------------- next part --------------
=== modified file 'debian/changelog'
--- a/debian/changelog	2007-12-26 17:57:58 +0000
+++ b/debian/changelog	2007-12-26 18:01:19 +0000
@@ -16,8 +16,10 @@
   * 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 <mhy at debian.org>  Wed, 26 Dec 2007 17:56:28 +0000
+ -- Mark Hymers <mhy at debian.org>  Wed, 26 Dec 2007 18:00:08 +0000
 
 userdir-ldap (0.3.15) unstable; urgency=low
 

=== modified file 'ud-useradd'
--- a/ud-useradd	2007-12-26 17:57:58 +0000
+++ b/ud-useradd	2007-12-26 18:01:19 +0000
@@ -306,7 +306,7 @@
 
 # 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);



More information about the Da-tools-commits mailing list