From 8db78c7d4db84ff9e191457bbf4b1254da321c7e Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Fri, 8 Jul 2022 11:05:24 +0200 Subject: [PATCH] project: simplify if-statement Change-Id: I05e4505b45963fe6e85cf74a669afafd00fc83c0 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/340457 Reviewed-by: Mike Frysinger Tested-by: Martin Geisler --- project.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/project.py b/project.py index 8274f022..cf58a624 100644 --- a/project.py +++ b/project.py @@ -792,10 +792,7 @@ class Project(object): def HasChanges(self): """Returns true if there are uncommitted changes. """ - if self.UncommitedFiles(get_all=False): - return True - else: - return False + return bool(self.UncommitedFiles(get_all=False)) def PrintWorkTreeStatus(self, output_redir=None, quiet=False): """Prints the status of the repository to stdout.