X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FAddPersonToSite.py;h=17c3c993beee82eab1afd528e96067d16420f12d;hb=36de11f1c6e35ae81eb4774a395f3507cd44feb3;hp=487892ceffddbe5427b4ca89f31b38218e6c4091;hpb=9b3801556c6c6df3963a7dd836131813e8e533fb;p=plcapi.git diff --git a/PLC/Methods/AddPersonToSite.py b/PLC/Methods/AddPersonToSite.py index 487892c..17c3c99 100644 --- a/PLC/Methods/AddPersonToSite.py +++ b/PLC/Methods/AddPersonToSite.py @@ -8,6 +8,8 @@ from PLC.PersonTags import PersonTags, PersonTag from PLC.Namespace import email_to_hrn from PLC.TagTypes import TagTypes +from PLC.Debug import log + class AddPersonToSite(Method): """ Adds the specified person to the specified site. If the person is @@ -81,10 +83,10 @@ class AddPersonToSite(Method): person_tag['value'] = hrn person_tag.sync() except Exception,e: - print "BEG Warning, cannot maintain person's hrn, %s"%e + print >> log, "BEG Warning, cannot maintain person's hrn, %s"%e import traceback - traceback.print_exc() - print "END Warning, cannot maintain person's hrn, %s"%e + traceback.print_exc(file=log) + print >> log, "END Warning, cannot maintain person's hrn, %s"%e return 1