From 6d421381a71c9d915371f9ac50d733830d5e99fb Mon Sep 17 00:00:00 2001 From: Albert Pool Date: Sun, 21 Jun 2020 21:53:28 +0200 Subject: [PATCH] Simplify startswith() Co-authored-by: Abhijeet Kasurde --- plugins/action/synchronize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/action/synchronize.py b/plugins/action/synchronize.py index b4241bf..480a9c4 100644 --- a/plugins/action/synchronize.py +++ b/plugins/action/synchronize.py @@ -33,7 +33,7 @@ class ActionModule(ActionBase): def _get_absolute_path(self, path): original_path = path - if path.startswith('rsync://') or path.startswith('/') or ':' in path: + if path.startswith(('rsync://', '/')) or ':' in path: return path if self._task._role is not None: