summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2012-07-10 14:28:39 -0400
committerScott Moser <smoser@ubuntu.com>2012-07-10 14:28:39 -0400
commite43d91ba92a078c574dbf966fbeaf6a4b3d50d7d (patch)
treeab7558cb91f2635a867a78ad897489b08abbe94c /cloudinit
parentac867b475eea28429333966fd0f7d10564e8417a (diff)
parent954f3d58388b9826dd6db4128e494ad36298db3e (diff)
downloadvyos-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.
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/helpers.py3
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):