From 7dca7548b84a60ac3ce3b12559ff3ad465f81baa Mon Sep 17 00:00:00 2001 From: RubenDjOn Date: Mon, 6 Apr 2015 16:08:31 +0200 Subject: [PATCH] Fixed TypeError: endswith first arg must be bytes Fixed TypeError: endswith first arg must be bytes or a tuple of bytes, not str --- desktop/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/__init__.py b/desktop/__init__.py index d8bfcc8..40fcf1d 100644 --- a/desktop/__init__.py +++ b/desktop/__init__.py @@ -135,7 +135,7 @@ def _is_xfce(): # XFCE detection involves testing the output of a program. try: - return _readfrom(_get_x11_vars() + "xprop -root _DT_SAVE_MODE", shell=1).strip().endswith(' = "xfce4"') + return _readfrom(_get_x11_vars() + "xprop -root _DT_SAVE_MODE", shell=1).strip().endswith(str.encode(' = "xfce4"')) except OSError: return 0