[Libreoffice-commits] .: Branch 'libreoffice-4-0' - scripting/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Jan 11 10:12:57 PST 2013


 scripting/source/pyprov/mailmerge.py |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f49e469d93749547520ae34c52d26f17bcc32cf7
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Jan 11 18:29:14 2013 +0100

    fdo#59249: String literal needs a "b" prefix in Pyhton 3
    
    as the corresponding test is otherwise seen to fail, with user being b, but I have
    no idea if this is the most Python-3-ish approach to fix that, or whether more code
    needs to be fixed, too.
    
    Change-Id: Ia7fbcbca3cf578ffe1bd5ce3c7c5b709cc77317e
    (cherry picked from commit 7a7e19c166df326c45f76a142b478b0629f784c9)
    
    Signed-off-by: Michael Stahl <mstahl at redhat.com>

diff --git a/scripting/source/pyprov/mailmerge.py b/scripting/source/pyprov/mailmerge.py
index 236bea1..d76322e 100755
--- a/scripting/source/pyprov/mailmerge.py
+++ b/scripting/source/pyprov/mailmerge.py
@@ -101,7 +101,7 @@ class PyMailSMTPService(unohelper.Base, XSmtpService):
 
 		user = xAuthenticator.getUserName().encode('ascii')
 		password = xAuthenticator.getPassword().encode('ascii')
-		if user != '':
+		if user != b'':
 			if dbg:
 				print("Logging in, username of" + user, file=dbgout)
 			self.server.login(user, password)
@@ -281,7 +281,7 @@ class PyMailIMAPService(unohelper.Base, XMailService):
 			
 		user = xAuthenticator.getUserName().encode('ascii')
 		password = xAuthenticator.getPassword().encode('ascii')
-		if user != '':
+		if user != b'':
 			if dbg:
 				print("Logging in, username of" + user, file=dbgout)
 			self.server.login(user, password)


More information about the Libreoffice-commits mailing list