summaryrefslogtreecommitdiffstats
path: root/gitautodeploy/gitautodeploy.py
diff options
context:
space:
mode:
Diffstat (limited to 'gitautodeploy/gitautodeploy.py')
-rw-r--r--gitautodeploy/gitautodeploy.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/gitautodeploy/gitautodeploy.py b/gitautodeploy/gitautodeploy.py
index 5d67851..8347d6a 100644
--- a/gitautodeploy/gitautodeploy.py
+++ b/gitautodeploy/gitautodeploy.py
@@ -97,6 +97,18 @@ class GitAutoDeploy(object):
# Iterate over all configured repositories
for repo_config in self._config['repositories']:
+ # Only clone repositories with a configured path
+ if 'url' not in repo_config:
+ logger.critical("Repository has no configured URL")
+ self.close()
+ self.exit()
+ return
+
+ # Only clone repositories with a configured path
+ if 'path' not in repo_config:
+ logger.debug("Repository %s will not be cloned (no path configured)" % repo_config['url'])
+ continue
+
if os.path.isdir(repo_config['path']) and os.path.isdir(repo_config['path']+'/.git'):
GitWrapper.init(repo_config)
else:
@@ -455,10 +467,7 @@ def main():
config['repositories'].append(repo_config)
# Initialize config by expanding with missing values
- if init_config(config) != 0:
- app.close()
- app.exit()
- return
+ init_config(config)
app.setup(config)
app.serve_forever()