diff options
author | Oliver Poignant <oliver@poignant.se> | 2016-06-13 23:18:18 +0200 |
---|---|---|
committer | Oliver Poignant <oliver@poignant.se> | 2016-06-13 23:18:18 +0200 |
commit | fb67fb63bfe8abbd0e0ac0ab143c05be41d84c9f (patch) | |
tree | 2c4331f83c33fdaea2a44fd2fde697f0a1608ce2 | |
parent | e70fa110381557e9e688dfad13d02a912ce7dba1 (diff) | |
download | Git-Auto-Deploy-fb67fb63bfe8abbd0e0ac0ab143c05be41d84c9f.zip Git-Auto-Deploy-fb67fb63bfe8abbd0e0ac0ab143c05be41d84c9f.tar.gz Git-Auto-Deploy-fb67fb63bfe8abbd0e0ac0ab143c05be41d84c9f.tar.bz2 |
Compatibility with older versions of lockfile module
-rw-r--r-- | gitautodeploy/lock.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gitautodeploy/lock.py b/gitautodeploy/lock.py index d408182..126496b 100644 --- a/gitautodeploy/lock.py +++ b/gitautodeploy/lock.py @@ -1,4 +1,3 @@ -from lockfile import LockFile class Lock(): """Simple implementation of a mutex lock using the file systems. Works on @@ -8,6 +7,13 @@ class Lock(): lock = None def __init__(self, path): + try: + from lockfile import LockFile + except ImportError: + from lockfile import FileLock + # Different naming in older versions of lockfile + LockFile = FileLock + self.path = path self.lock = LockFile(path) |