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
This commit is contained in:
Dougal Matthews 2018-06-29 14:34:55 +01:00
parent 7c16877195
commit 66adfd97ef
1 changed files with 1 additions and 1 deletions

View File

@ -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