def __init__(self, path, threaded=True):
        """
        >>> lock = LockBase("somefile")
        >>> lock = LockBase("somefile", threaded=False)
        """
        self.path = path
        self.lock_file = os.path.abspath(path) + ".lock"
        self.hostname = socket.gethostname()
        self.pid = os.getpid()
        if threaded:
            name = threading.current_thread().get_name()
            tname = quote(name, safe="") % "%s-"
        else:
            tname = ""
        dirname = os.path.dirname(self.lock_file)
        self.unique_name = os.path.join(dirname,
                                        "%s.%s%s" % (self.hostname,
                                                     tname,
                                                     self.pid))
dataset/ETHPy150Open haystack/eyebrowse-server/notifications/lockfile.py/LockBase.__init__/swapped operands of `%`