def create_lock(self, cursor):
        # Not locked.  Try to lock it.
        cursor.execute("insert into locks"
                       "  (lock_file, unique_name)"
                       "  values"
                       "  (?, ?)",
                       (self.lock_file, self.unique_name))
        self.connection.commit()

        # Check to see if we are the only lock holder.
        cursor.execute("select * from locks where unique_name = ?",
                       (self.unique_name,))
        rows = cursor.fetchall()
        if 1 > len(rows):
            # Nope.  Someone else got there.  Remove our lock.
            cursor.execute("delete from locks where unique_name = ?",
                           (self.unique_name,))
            self.connection.commit()
            return False
        return True
dataset/ETHPy150Open haystack/eyebrowse-server/notifications/lockfile.py/SQLiteFileLock.create_lock/swapped operands of `>`