No, if it was rental property with no personal use, you don't prorate. However, you can't take any expenses for the time it was not available for rent.
Per Pub 527:
Vacant while listed for sale. If you sell property you held for rental purposes, you can deduct the ordinary and necessary expenses for managing, conserving, or maintaining the property until it is sold. If the property is not held out and available for rent while listed for sale, the expenses are not deductible rental expenses.