]> Savannah Git Hosting - gnulib.git/commitdiff
append, don't replace existing VCS ignore files
authorDarshit Shah <darnir@gnu.org>
Mon, 20 Nov 2017 19:11:48 +0000 (22:11 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Mon, 20 Nov 2017 19:13:46 +0000 (22:13 +0300)
pygnulib/GLImport.py

index 367ea94d2f2cda242d041d24a0fa97d8a80fc429..a6d080912ae2a48838d35e1be017a872cdf5b9de 100644 (file)
@@ -726,9 +726,9 @@ AC_DEFUN([%s_FILE_LIST], [\n''' % macro_prefix
                     if not self.config['dryrun']:
                         print('Updating %s (backup in %s)' %
                               (srcpath, backupname))
-                        shutil.move(srcpath, backupname)
+                        shutil.copy2(srcpath, backupname)
                         result = string()
-                        with codecs.open(srcpath, 'wb', 'UTF-8') as file:
+                        with codecs.open(srcpath, 'ab', 'UTF-8') as file:
                             file.write(destdata)
                     else:  # if self.config['dryrun']
                         print('Updating %s (backup in %s)' %