For readability:
catalogname = CatSubSet(*newcatlst[p]).catalogname
if catalogname.endswith("_stub"):
  ...