[gnome-continuous] Do not overwrite variables
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous] Do not overwrite variables
- Date: Wed, 29 Nov 2017 16:41:11 +0000 (UTC)
commit 53f2d79c6ed3d75749885238725220da6ea8f7db
Author: Emmanuele Bassi <ebassi gnome org>
Date: Wed Nov 29 16:40:16 2017 +0000
Do not overwrite variables
We're using the same variable for two separate iterations, so we need to
make sure that we're not overwriting its value.
src/ostree-build-compile-one | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/ostree-build-compile-one b/src/ostree-build-compile-one
index 5b01f3d..5e980a9 100755
--- a/src/ostree-build-compile-one
+++ b/src/ostree-build-compile-one
@@ -211,17 +211,20 @@ def main(args):
use_make = False
use_ninja = False
+
buildfile_path = None
for name in ['build.ninja']:
- buildfile_path = os.path.join(builddir, name)
- if os.path.exists(buildfile_path):
+ file_path = os.path.join(builddir, name)
+ if os.path.exists(file_path):
+ buildfile_path = file_path
use_ninja = True
break
for name in ['Makefile', 'makefile', 'GNUmakefile']:
- buildfile_path = os.path.join(builddir, name)
- if os.path.exists(buildfile_path):
+ file_path = os.path.join(builddir, name)
+ if os.path.exists(file_path):
+ buildfile_path = file_path
use_make = True
break
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]