summaryrefslogtreecommitdiff
path: root/scripting/source/pyprov/pythonscript.py
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2020-04-04 20:01:17 +0200
committerMichael Stahl <michael.stahl@cib.de>2020-04-09 16:43:34 +0200
commitc4fa6efa67775a6b333a4a5aa873b5cc24a4f7bc (patch)
treed8977f4c2c97287865a2407b25c0327c49bbe17c /scripting/source/pyprov/pythonscript.py
parent2d64651e889e55f63c90ded24e63e17eaf52102f (diff)
pyuno,*: kill Python 2 support with fire
Python 2 support was retained for use with --enable-python=system on RHEL7 and SLES. The time has arrived to remove it. Some .py files that were imported from third parties are not changed to enable easier replacement with updated versions if necessary. solenv/gdb should continue to support Python 2. bin/get-bugzilla-attachments-by-mimetype requires Python 2 to access Launchpad. Change-Id: I26414ae8e9f8402c90336af82020135685694217 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91697 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'scripting/source/pyprov/pythonscript.py')
-rw-r--r--scripting/source/pyprov/pythonscript.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py
index 82973266a2b0..5e14a863e8b8 100644
--- a/scripting/source/pyprov/pythonscript.py
+++ b/scripting/source/pyprov/pythonscript.py
@@ -27,12 +27,6 @@ import ast
import platform
from com.sun.star.uri.RelativeUriExcessParentSegments import RETAIN
-try:
- unicode
-except NameError:
- # Python 3 compatibility
- unicode = str
-
class LogLevel:
NONE = 0 # production level
ERROR = 1 # for script developers
@@ -967,7 +961,7 @@ class PythonScriptProvider( unohelper.Base, XBrowseNode, XScriptProvider, XNameC
inv = None
storageType = ""
- if isinstance(args[0],unicode ):
+ if isinstance(args[0], str):
storageType = args[0]
if storageType.startswith( "vnd.sun.star.tdoc" ):
doc = getModelFromDocUrl(ctx, storageType)