workdir: create the lock dir if needed on unlock
authorSteven Walter <swalter@lpdev.prtdev.lexmark.com>
Wed, 3 Dec 2008 21:02:01 +0000 (3 16:02 -0500)
committerSteven Walter <swalter@lpdev.prtdev.lexmark.com>
Wed, 3 Dec 2008 21:02:01 +0000 (3 16:02 -0500)
plugins/workdir.py

index e08b48b..f6c1bec 100644 (file)
@@ -14,6 +14,11 @@ class WorkdirPlugin(YapCore):
     def _unlock_branch(self, branch):
         repo = get_output('git rev-parse --git-dir')[0]
         dir = os.path.join(repo, 'yap', 'lock')
+        try:
+            os.mkdir(dir)
+        except OSError:
+            pass
+
         lockfile = os.path.join(dir, branch.replace('/', '\/'))
 
         try: