Tcont.py 717 B

12345678910111213141516171819202122232425262728
  1. from Base import Base
  2. from Util import Strings
  3. class Tcont(Base):
  4. def __init__(self):
  5. Base.__init__(self)
  6. def get_tcont_id(self):
  7. """
  8. Get the tcont id
  9. :return: Return the tcont id or blank
  10. """
  11. data_compare = self.name.lower().split()
  12. index = Strings.index_value(data_compare, "tcont")
  13. if index >= 0:
  14. return data_compare[index + 1].strip()
  15. else:
  16. return ""
  17. def get_tcont_profile(self):
  18. data_compare = self.name.lower().split()
  19. index = Strings.index_value(data_compare, "profile")
  20. if index >= 0:
  21. return data_compare[index + 1].strip()
  22. else:
  23. return ""