[X2Go-Commits] [x2goclient] 44/94: uses touch_file function from python-x2go API

git-admin at x2go.org git-admin at x2go.org
Fri Dec 15 21:04:41 CET 2023


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

x2go pushed a commit to annotated tag 0.1.4.0
in repository x2goclient.

commit 571313b6fd6527cb5083338902df9abd4cb13307
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Tue May 17 09:05:28 2011 +0200

    uses touch_file function from python-x2go API
---
 pyhoca/cli/frontend.py | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/pyhoca/cli/frontend.py b/pyhoca/cli/frontend.py
index bdda1d4a..45e5cfed 100644
--- a/pyhoca/cli/frontend.py
+++ b/pyhoca/cli/frontend.py
@@ -36,13 +36,7 @@ from x2go.defaults import X2GO_PRINT_ACTIONS
 # use current_home as user home dir
 current_home = os.path.expanduser("~")
 
-def _touch_file(filename):
-
-    if not os.path.isdir(os.path.dirname(filename)):
-        os.makedirs(os.path.dirname(filename), mode=00700)
-    f = open(filename, 'w')
-    f.close()
-
+from x2go.utils import touch_file as _touch_file
 
 # define and create known_hosts file (if not there)
 ssh_known_hosts_filename = os.path.join(x2go.LOCAL_HOME, x2go.X2GO_SSH_ROOTDIR, 'known_hosts')

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


More information about the x2go-commits mailing list