From: Dmitry Selyutin Date: Fri, 29 Jun 2018 07:05:31 +0000 (+0300) Subject: pygnulib: postpone ignore files backup X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b3c883352e18c0d5657e621065d53d577da1ccd;p=thirdparty%2Fgnulib.git pygnulib: postpone ignore files backup --- diff --git a/pygnulib.py b/pygnulib.py index 554fb2fd25..b7927de5d9 100755 --- a/pygnulib.py +++ b/pygnulib.py @@ -489,7 +489,6 @@ def import_hook(script, gnulib, namespace, explicit, verbosity, options, *args, try: with vfs_iostream(project, path, "rb", "UTF-8") as stream: ignores = [line.strip() for line in stream.readlines()] - vfs_backup(project, path) present = True except: present = False @@ -505,6 +504,8 @@ def import_hook(script, gnulib, namespace, explicit, verbosity, options, *args, include.add(name) if include or (set(ignores) & exclude): print(f"Updating {path} (backup in {path}~)", file=sys.stdout) + if present: + vfs_backup(project, path) with vfs_iostream(project, path, "wb", "UTF-8") as stream: for entry in ignores: if entry not in exclude: