From 3e571fc4cf4732272c2ffc2dec75950129ae2a19 Mon Sep 17 00:00:00 2001 From: David Stainton Date: Tue, 14 Jul 2015 16:41:16 -0700 Subject: [PATCH] simplify _should_download helper method --- src/allmydata/frontends/magic_folder.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/allmydata/frontends/magic_folder.py b/src/allmydata/frontends/magic_folder.py index 4b51606c..46e0960e 100644 --- a/src/allmydata/frontends/magic_folder.py +++ b/src/allmydata/frontends/magic_folder.py @@ -121,13 +121,7 @@ class MagicFolder(service.MultiService): latest version wins. """ v = self._db.get_local_file_version(path) - if v is None: - return True - else: - if v < remote_version: - return True - else: - return False + return (v is None or v < remote_version) def _get_collective_latest_file(self, filename): """_get_collective_latest_file takes a file path pointing to a file managed by -- 2.45.2