diff options
author | Oliver Poignant <oliver@poignant.se> | 2016-09-03 13:10:00 +0200 |
---|---|---|
committer | Oliver Poignant <oliver@poignant.se> | 2016-09-03 13:10:00 +0200 |
commit | e9ef0f56dc9e5f90a962a742dc7a215932c11b8e (patch) | |
tree | dd61e7c1c9cccd639e609bfff7515b3c601ddd19 /gitautodeploy/httpserver.py | |
parent | cb1fd63a6f0bd74f92dcdb78e0439b1e50af4b0a (diff) | |
download | Git-Auto-Deploy-e9ef0f56dc9e5f90a962a742dc7a215932c11b8e.zip Git-Auto-Deploy-e9ef0f56dc9e5f90a962a742dc7a215932c11b8e.tar.gz Git-Auto-Deploy-e9ef0f56dc9e5f90a962a742dc7a215932c11b8e.tar.bz2 |
Improved error message on permission issues
Diffstat (limited to 'gitautodeploy/httpserver.py')
-rw-r--r-- | gitautodeploy/httpserver.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gitautodeploy/httpserver.py b/gitautodeploy/httpserver.py index 320efff..71944b0 100644 --- a/gitautodeploy/httpserver.py +++ b/gitautodeploy/httpserver.py @@ -243,6 +243,13 @@ class WebhookRequestHandler(BaseHTTPRequestHandler): result.append(repo_result) continue + # If the path is not writable, a warning will be raised and no pull or + # deploy will be made. + if not os.access(repo_config['path'], os.W_OK): + logger.error("The path '%s' is not writable. Make sure that GAD has write access to that path." % repo_config['path']) + result.append(repo_result) + continue + running_lock = Lock(os.path.join(repo_config['path'], 'status_running')) waiting_lock = Lock(os.path.join(repo_config['path'], 'status_waiting')) try: |