Don't worry if we can't save a Prof.
authorW. Trevor King <wking@drexel.edu>
Thu, 1 Jul 2010 03:06:21 +0000 (23:06 -0400)
committerW. Trevor King <wking@drexel.edu>
Thu, 1 Jul 2010 03:06:21 +0000 (23:06 -0400)
sitecore/prof/import.py

index e48891097434c8af57aba9f72818183de0cffd87..95e07abb0c7a62a2cce1032ca381f7673e161c59 100644 (file)
@@ -112,7 +112,12 @@ class ProfessorAdder (object):
         #granddad,field = self.s.find_field('Headshot:')
         #granddad.find_element_by_link_text('Properties')
         # TODO, set width/height
-        self.s.publish_section('Added/updated Prof. %s' % prof.name.last)
+        try:
+            self.s.publish_section('Added/updated Prof. %s' % prof.name.last)
+        except NoSuchElementException:
+            self.s.logger.info(
+                'Problem saving/publishing %s (locked by someone else?).'
+                '  Continuing.')
 
     def create_prof_page(self, name):
         try: