summaryrefslogtreecommitdiffstats
path: root/GitAutoDeploy.py
diff options
context:
space:
mode:
authorchivorotkiv <shmakov@omich.net>2015-05-09 20:43:32 +0600
committerchivorotkiv <shmakov@omich.net>2015-05-09 20:43:32 +0600
commit9f80aff4c0c3eaa8b5580853a1b988d5c8a08332 (patch)
treeddd0554cb71e170f0d07ec2cf33e87d19d44d69c /GitAutoDeploy.py
parente6930422c69fac5c998b6ce3b223cfff5da4fd22 (diff)
downloadGit-Auto-Deploy-9f80aff4c0c3eaa8b5580853a1b988d5c8a08332.zip
Git-Auto-Deploy-9f80aff4c0c3eaa8b5580853a1b988d5c8a08332.tar.gz
Git-Auto-Deploy-9f80aff4c0c3eaa8b5580853a1b988d5c8a08332.tar.bz2
Remove lock files on startup.
Diffstat (limited to 'GitAutoDeploy.py')
-rwxr-xr-xGitAutoDeploy.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/GitAutoDeploy.py b/GitAutoDeploy.py
index 487e9b2..f6ed8ac 100755
--- a/GitAutoDeploy.py
+++ b/GitAutoDeploy.py
@@ -35,6 +35,7 @@ class GitAutoDeploy(BaseHTTPRequestHandler):
if(not os.path.isdir(repository['path'] + '/.git')):
print "Directory %s is not a Git repository" % repository['path']
sys.exit(2)
+ self.clearLock(repository['path'])
return myClass.config
@@ -126,6 +127,9 @@ class GitAutoDeploy(BaseHTTPRequestHandler):
def unlock(self, path):
call(['sh unlock.sh "' + path + '"'], shell=True)
+ def clearLock(self, path):
+ call(['sh clear_lock.sh "' + path + '"'], shell=True)
+
def pull(self, path, branch):
if(not self.quiet):
print "\nPost push request received"