diff --git a/avocado/utils/filelock.py b/avocado/utils/filelock.py index ac46084556eacd13c0e1dcad64c0201d57456fc2..b996f6e0807ab9512382faef9dc6e551c1cf8547 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 = b'%r' % os.getpid() + self.pid = '{0}'.format(os.getpid()).encode() self.locked = False self.timeout = timeout