diff options
author | Scott Moser <smoser@ubuntu.com> | 2012-07-10 14:28:39 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-07-10 14:28:39 -0400 |
commit | e43d91ba92a078c574dbf966fbeaf6a4b3d50d7d (patch) | |
tree | ab7558cb91f2635a867a78ad897489b08abbe94c | |
parent | ac867b475eea28429333966fd0f7d10564e8417a (diff) | |
parent | 954f3d58388b9826dd6db4128e494ad36298db3e (diff) | |
download | vyos-cloud-init-e43d91ba92a078c574dbf966fbeaf6a4b3d50d7d.tar.gz vyos-cloud-init-e43d91ba92a078c574dbf966fbeaf6a4b3d50d7d.zip |
Return a more useful name for the file lock
The name for the file lock now shows what file is being locked.
-rw-r--r-- | cloudinit/helpers.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cloudinit/helpers.py b/cloudinit/helpers.py index 15036a50..a4b20208 100644 --- a/cloudinit/helpers.py +++ b/cloudinit/helpers.py @@ -67,6 +67,9 @@ class FileLock(object): def __init__(self, fn): self.fn = fn + def __str__(self): + return "<%s using file %r>" % (util.obj_name(self), self.fn) + class FileSemaphores(object): def __init__(self, sem_path): |