Darshit Shah
2017-09-11 11:49:57 UTC
* pygnulib/GLImport.py(_update_ignorelist_): Append the ignore data to
any existing VCS ignore files instead of replacing them
---
pygnulib/GLImport.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pygnulib/GLImport.py b/pygnulib/GLImport.py
index 4352a7ec5..b0e3ec655 100644
--- a/pygnulib/GLImport.py
+++ b/pygnulib/GLImport.py
@@ -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, 'a', 'UTF-8') as file:
file.write(destdata)
else: # if self.config['dryrun']
print('Updating %s (backup in %s)' %
any existing VCS ignore files instead of replacing them
---
pygnulib/GLImport.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pygnulib/GLImport.py b/pygnulib/GLImport.py
index 4352a7ec5..b0e3ec655 100644
--- a/pygnulib/GLImport.py
+++ b/pygnulib/GLImport.py
@@ -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, 'a', 'UTF-8') as file:
file.write(destdata)
else: # if self.config['dryrun']
print('Updating %s (backup in %s)' %
--
2.14.1
2.14.1