Changeset: bb771530efaa for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bb771530efaa
Modified Files:
        buildtools/conf/fixlicense.py
Branch: Jan2014
Log Message:

Preserve file mode when deleting license.


diffs (15 lines):

diff --git a/buildtools/conf/fixlicense.py b/buildtools/conf/fixlicense.py
--- a/buildtools/conf/fixlicense.py
+++ b/buildtools/conf/fixlicense.py
@@ -443,6 +443,11 @@ def dellicense(file, pre = None, post = 
     f.close()
     g.close()
     try:
+        st = os.stat(file)
+        os.chmod(file + '.new', stat.S_IMODE(st.st_mode))
+    except OSError:
+        pass
+    try:
         os.rename(file, file + '~')     # make backup
     except OSError:
         print >> sys.stderr, 'Cannot make backup for %s' % file
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to