The Messenger of Allah ﷺ said, "For a man's belly to be filled with pus until it consumes him is better for him than for it to be filled with poetry," except that Hafs did not include the words "until it consumes him."
حدثنا أبو بكر حدثنا حفص وأبو معاوية ووكيع عن الأعمش عن أبي صالح
قال رسول الله ﷺ لأن يمتلئ جوف الرجل قيحا حتى يريه خير له من أن يمتلئ شعرا إلا أن حفصا لم يقل يريه
Bukhari narrated it in the Book of Manners, in the chapter on disliking that poetry should dominate a person to the point that it distracts him from the remembrance of Allah and from the knowledge of the Quran, hadith no. 6155, from the hadith of Amash, with this wording. And Muslim narrated it in the Book of Poetry, in the chapter titled "On the recitation of poetry," vol. 7/2257, from Ibn Abu Shayba, with this wording.