From c9daf93f6955dfbce166f78f2a96b12f1f632248 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Mart=C3=AD?= Date: Thu, 25 Sep 2014 18:11:56 +0200 Subject: [PATCH] Create local.properties if it doesn't exist --- fdroidserver/common.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/fdroidserver/common.py b/fdroidserver/common.py index b984e9da..d77ae57d 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -1188,13 +1188,15 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, onserver= if build['subdir']: localprops += [os.path.join(root_dir, 'local.properties')] for path in localprops: - if not os.path.isfile(path): - continue - logging.info("Updating properties file at %s" % path) - f = open(path, 'r') - props = f.read() - f.close() - props += '\n' + props = "" + if os.path.isfile(path): + logging.info("Updating local.properties file at %s" % path) + f = open(path, 'r') + props += f.read() + f.close() + props += '\n' + else: + logging.info("Creating local.properties file at %s" % path) # Fix old-fashioned 'sdk-location' by copying # from sdk.dir, if necessary if build['oldsdkloc']: -- 2.30.2