[X2Go-Commits] [python-x2go] 02/02: Rewrite string variables to '' if they are set to None during instance construction.

git-admin at x2go.org git-admin at x2go.org
Thu Sep 2 16:28:05 CEST 2021


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository python-x2go.

commit ce28c9235a8db51718f6f5e3f7283285250ca060
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Thu Sep 2 16:27:49 2021 +0200

    Rewrite string variables to '' if they are set to None during instance construction.
---
 debian/changelog                |  2 ++
 x2go/backends/terminal/plain.py | 10 ++++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 8fe550a..7732f69 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,6 +13,8 @@ python-x2go (0.6.1.4-0x2go1) UNRELEASED; urgency=medium
       is the currently best thinkable approach).
     - x2go/client.py: Catch some (more)
       x2go_exceptions.X2GoSessionRegistryException occurrences.
+    - Rewrite string variables to '' if they are set to None during instance
+      construction.
   * debian/*:
     + Drop Python2 builds.
 
diff --git a/x2go/backends/terminal/plain.py b/x2go/backends/terminal/plain.py
index fa82de9..76bca92 100644
--- a/x2go/backends/terminal/plain.py
+++ b/x2go/backends/terminal/plain.py
@@ -361,7 +361,10 @@ class X2GoTerminalSession(object):
         self.params.geometry = str(geometry)
         self.params.link = str(link)
         self.params.pack = str(pack)
-        self.params.dpi = str(dpi)
+        if dpi:
+            self.params.dpi = str(dpi)
+        else:
+            self.params.dpi = ''
         self.params.cache_type = str(cache_type)
         self.params.session_type = str(session_type)
         self.params.kbtype = str(kbtype)
@@ -396,7 +399,10 @@ class X2GoTerminalSession(object):
 
         self.profile_name = profile_name
         self.set_session_title = set_session_title
-        self.session_title = session_title
+        if session_title:
+            self.session_title = session_title
+        else:
+            self.session_title = ''
         self.session_window = None
 
         # auto-detect graphical proxy/kdrive backend?

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/python-x2go.git


More information about the x2go-commits mailing list