Well, yes. But being married more than once wouldn't exclude a person, the way I look at it, especially if he's not currently married. The Church would simply conclude that one or both of the "marriages" was invalid, and the whole thing not relevant to the Papacy.
If carrying on outside a legitimate Catholic marriage excluded a person from being Pope, think of all the Pope's we wouldn't have had ... Rodrigo Borgia (Alexander VI) for instance ...
Can. 149 §1 In order to be promoted to an ecclesiastical office, one must be in communion with the Church, and be suitable, that is, possessed of those qualities which are required for that office by universal or particular law or by the law of the foundation.