[X2Go-Commits] [pyhoca-gui] 01/02: Create Windows log file folder before attempting clean up (old log file removal).
git-admin at x2go.org
git-admin at x2go.org
Wed Apr 16 11:19:20 CEST 2014
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository pyhoca-gui.
commit ee42ca605e4c6d9332f9327dad6df61cd2c43b90
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Wed Apr 16 11:17:03 2014 +0200
Create Windows log file folder before attempting clean up (old log file removal).
---
debian/changelog | 2 ++
pyhoca/wxgui/mswin_logging.py | 5 ++++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 9747794..1284b78 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -43,6 +43,8 @@ pyhoca-gui (0.5.0.0-0x2go1) UNRELEASED; urgency=low
- Make check_running() test terminal server / multi-session safe. (Fixes: #19).
- Windows PyHoca-GUI.log file: create with PID in file name. On log file creation
try removing all old log files that are not still open.
+ - Create Windows log file folder before attempting clean up (old log file
+ removal).
- Make sure new session profiles are mutable in the session profile manager GUI.
- Gray-out Apply button in session profile GUI on profile creation.
- Update English / German translation.
diff --git a/pyhoca/wxgui/mswin_logging.py b/pyhoca/wxgui/mswin_logging.py
index 2961244..baadb7a 100644
--- a/pyhoca/wxgui/mswin_logging.py
+++ b/pyhoca/wxgui/mswin_logging.py
@@ -30,6 +30,10 @@ def setup_mswinlog(PROG_NAME):
_file = None
def __init__(self, filemode='a'):
+ try:
+ os.mkdir(os.path.dirname(self._fname))
+ except:
+ pass
self._filemode = filemode
if self._filemode == "w+":
for _file in os.listdir(os.path.dirname(self._fname)):
@@ -59,4 +63,3 @@ def setup_mswinlog(PROG_NAME):
sys.stdout = MSWin_Logging(filemode='w+')
sys.stderr = MSWin_Logging(filemode='a')
del MSWin_Logging
-
--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/pyhoca-gui.git
More information about the x2go-commits
mailing list