From 66adfd97ef38b9f0c037df1026930578ff3c5d19 Mon Sep 17 00:00:00 2001 From: Dougal Matthews Date: Fri, 29 Jun 2018 14:34:55 +0100 Subject: [PATCH] Replace 'raise StopIteration' with 'return' With PEP 479, the behaviour of StopIteration is changing. Raising it to stop a generator is considered incorrect and from Python 3.7 this will cause a RuntimeError. The PEP recommends using the return statement. More details: https://www.python.org/dev/peps/pep-0479/#examples-of-breakage Change-Id: I5ea49c24c90d33e7fb5ae916c43e01d3d7537477 --- freezer/engine/rsync/rsync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freezer/engine/rsync/rsync.py b/freezer/engine/rsync/rsync.py index 132e8bcc..ef40baca 100644 --- a/freezer/engine/rsync/rsync.py +++ b/freezer/engine/rsync/rsync.py @@ -248,7 +248,7 @@ class RsyncEngine(engine.BackupEngine): """ if not old_file_meta: - raise StopIteration + return # If the ctime or mtime has changed, the delta is computed # data block is returned