summaryrefslogtreecommitdiff
path: root/cloudinit/helpers.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-07-09 20:34:10 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-07-09 20:34:10 -0700
commit954f3d58388b9826dd6db4128e494ad36298db3e (patch)
treef0a9a71ac13b46dce411c4eabc692390630366a8 /cloudinit/helpers.py
parentb2817ac6dbfadff969aeb1ac28408bf960c94a3c (diff)
downloadvyos-cloud-init-954f3d58388b9826dd6db4128e494ad36298db3e.tar.gz
vyos-cloud-init-954f3d58388b9826dd6db4128e494ad36298db3e.zip
Return a more useful name for the file lock (which shows what file is being locked).
Diffstat (limited to 'cloudinit/helpers.py')
-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):