fixed owner bug
authorhaftmann
Thu, 08 Jun 2006 15:25:07 +0200
changeset 19827 e9e9be6111bb
parent 19826 4499a73efb1c
child 19828 f1dccc547595
fixed owner bug
Admin/website/build/obfusmail.py
--- a/Admin/website/build/obfusmail.py	Thu Jun 08 14:48:28 2006 +0200
+++ b/Admin/website/build/obfusmail.py	Thu Jun 08 15:25:07 2006 +0200
@@ -135,8 +135,14 @@
     mod = os.stat(htmlfile).st_mode
     gid = os.stat(htmlfile).st_gid
     cmd("convert label:'%s' '%s'" % (baremail, imgfile))
-    os.chmod(imgfile, mod)
-    os.chown(imgfile, -1, gid)
+    try:
+        os.chmod(imgfile, mod)
+    except OSError:
+        pass
+    try:
+        os.chown(imgfile, -1, gid)
+    except OSError:
+        pass
     if arg is not None:
         mailsimple = u"{%s} AT [%s] WITH (%s)" % (name, host, arg)
         mailscript = u" ".join(map(mk_line, ['<a href="', "mailto:", name, "@", host, "?", arg, '">']));