[skeleton] Copy files mode bits (debian/rules in particular)
authorDenis Laxalde <denis.laxalde@logilab.fr>
Wed, 05 Oct 2016 09:23:07 +0200
changeset 11693 b44c0d2462c9
parent 11692 d46e0b3a13cc
child 11694 cdd8b12dd184
[skeleton] Copy files mode bits (debian/rules in particular)
cubicweb/toolsutils.py
--- a/cubicweb/toolsutils.py	Wed Oct 05 08:55:02 2016 +0200
+++ b/cubicweb/toolsutils.py	Wed Oct 05 09:23:07 2016 +0200
@@ -155,6 +155,7 @@
                 show_diffs(tfpath, fpath, askconfirm)
             else:
                 shutil.copyfile(fpath, tfpath)
+                shutil.copymode(fpath, tfpath)
 
 def fill_templated_file(fpath, tfpath, context):
     with io.open(fpath, encoding='ascii') as fobj: