diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-08-02 09:52:37 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-08-02 11:07:16 +0100 |
commit | a34c9a8065c90250f7389cdea660a49e84289098 (patch) | |
tree | 126be05e35b4acad0af8b1fabbc48248a49fb15b /scripting | |
parent | 5bb166452b8a675c4da2f5928642337c90ade55a (diff) |
can't use set_debuglevel under windows
Diffstat (limited to 'scripting')
-rwxr-xr-x | scripting/source/pyprov/mailmerge.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripting/source/pyprov/mailmerge.py b/scripting/source/pyprov/mailmerge.py index 04af53a7a2b7..89302bb4599c 100755 --- a/scripting/source/pyprov/mailmerge.py +++ b/scripting/source/pyprov/mailmerge.py @@ -14,6 +14,7 @@ import unohelper import uno import re +import os #to implement com::sun::star::mail::XMailServiceProvider #and @@ -77,7 +78,11 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): if dbg: print >> sys.stderr, port self.server = smtplib.SMTP(server, port) - if dbg: + #stderr not available for us under windows, but + #set_debuglevel outputs there, and so throw + #an exception under windows on debugging mode + #with this enabled + if dbg and os.name != 'nt': self.server.set_debuglevel(1) connectiontype = xConnectionContext.getValueByName("ConnectionType") if dbg: |