From 954f3d58388b9826dd6db4128e494ad36298db3e Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Mon, 9 Jul 2012 20:34:10 -0700 Subject: Return a more useful name for the file lock (which shows what file is being locked). --- cloudinit/helpers.py | 3 +++ 1 file changed, 3 insertions(+) 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): -- cgit v1.2.3