From: W. Trevor King Date: Thu, 1 Jul 2010 00:52:38 +0000 (-0400) Subject: Create professors if they are missing X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b99590419e052f6f4f6b6a269f5a88714d2662e7;p=sitecorepy.git Create professors if they are missing --- diff --git a/sitecore/prof/import.py b/sitecore/prof/import.py index 23fdea8..bd8c5c4 100644 --- a/sitecore/prof/import.py +++ b/sitecore/prof/import.py @@ -115,8 +115,11 @@ class ProfessorAdder (object): self.s.publish_section('Added/updated Prof. %s' % prof.name.last) def create_prof_page(self, name): - self.s.open_nav_section(name) - return + try: + self.s.open_nav_section(name) + return + except NoSuchElementException: + pass self.s.open_nav_section('Copy of Shyamalendu Bose') old_windows = self.s.w.get_window_handles() self.s.w.find_element_by_link_text('Copy To').click()