From c156922c534515e26695bf9682c4e6aeda4642ce Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 14 Aug 2017 15:16:05 +0200 Subject: [PATCH] port avocado.utils.filelock to Python 3 Use the new "b'' % foo" formats from PEP461. Signed-off-by: Paolo Bonzini --- avocado/utils/filelock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/avocado/utils/filelock.py b/avocado/utils/filelock.py index 209e87e2..ac460845 100644 --- a/avocado/utils/filelock.py +++ b/avocado/utils/filelock.py @@ -42,7 +42,7 @@ class FileLock(object): def __init__(self, filename, timeout=0): self.filename = '%s.lock' % filename - self.pid = str(os.getpid()) + self.pid = b'%r' % os.getpid() self.locked = False self.timeout = timeout -- GitLab