Fix 'is' operator for comparison

The 'is' operator should not be used for comparison on some types of
literals. In CPython this works by accident and CPython 3.8 introduced a
SyntaxWarning (see https://bugs.python.org/issue34850).

Change-Id: Ifabe22e4ae3b9e1d3bfd5a663f39500e381cfa6e
Reviewed-on: https://gerrit.libreoffice.org/83034
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
This commit is contained in:
Jens Carl
2019-11-17 10:55:39 -08:00
committed by Xisco Faulí
parent a15729a63e
commit f09d88e8f8

View File

@@ -129,7 +129,7 @@ class FileAccess(object):
def getPath(self, parentURL, childURL):
string = ""
if childURL is not None and childURL is not "":
if childURL is not None and childURL != "":
string = "/" + childURL
return self.filenameConverter.getSystemPathFromFileURL(
parentURL + string)