Show
Ignore:
Timestamp:
12/23/07 13:21:27 (16 years ago)
Author:
arnonym
Message:

Set the rights on the new file the same as the old files rights.

Needed to create python-executables with replaced variables. See next commits...

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/admin/scanreplace.py

    r742 r769  
    2727 
    2828from string import Template 
     29import os 
    2930 
    3031def replace_action(target, source, env): 
    3132        open( str(target[0]), 'w' ).write( Template( open( str(source[0]), 'r' ).read() ).safe_substitute( env ) ) 
     33        os.chmod( str(target[0]), os.stat( str(source[0]) ).st_mode ) 
    3234        return 0 
    3335