[X2Go-Commits] [pyhoca-gui] 13/18: Move setup_win32log to a separate module namespace.

git-admin at x2go.org git-admin at x2go.org
Fri Feb 7 13:26:26 CET 2014


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

x2go pushed a commit to branch brokerclient
in repository pyhoca-gui.

commit ae4d2d8a0d7da625645df8d8cf008c950e8c0cae
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Fri Feb 7 10:48:05 2014 +0100

    Move setup_win32log to a separate module namespace.
---
 debian/changelog                         |    2 +-
 pyhoca-gui                               |    7 +++++--
 pyhoca-gui => pyhoca/mswin/__init__.py   |   22 ----------------------
 pyhoca/{wxgui => mswin}/win32_logging.py |    0
 4 files changed, 6 insertions(+), 25 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 8e8e52b..ed07aec 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,7 +10,7 @@ pyhoca-gui (0.5.0.0-0x2go1) UNRELEASED; urgency=low
   * Make SCRIPT_NAME in setup.py configurable (monkey-patchable).
   * Make setup.py importable, only run setup() function on direct calls.
   * Don't refer to py2exe anymore in nsis_template's naming scheme.
-  * Move setup_win32log to a separate module file.
+  * Move setup_win32log to a separate module namespace.
 
  -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Wed, 08 Jan 2014 21:28:37 +0100
 
diff --git a/pyhoca-gui b/pyhoca-gui
index d6e60b6..bbd2b48 100755
--- a/pyhoca-gui
+++ b/pyhoca-gui
@@ -23,8 +23,11 @@ import os
 import sys
 
 PROG_NAME = "PyHoca-GUI"
-from pyhoca.wxgui.win32_logging import setup_win32log
-setup_win32log(PROG_NAME)
+try:
+    from pyhoca.mswin.win32_logging import setup_win32log
+    setup_win32log(PROG_NAME)
+except ImportError:
+    pass
 
 from pyhoca.wxgui import __VERSION__
 from pyhoca.wxgui.launcher import PyHocaGUI_Launcher
diff --git a/pyhoca-gui b/pyhoca/mswin/__init__.py
old mode 100755
new mode 100644
similarity index 61%
copy from pyhoca-gui
copy to pyhoca/mswin/__init__.py
index d6e60b6..f04d824
--- a/pyhoca-gui
+++ b/pyhoca/mswin/__init__.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 # Copyright (C) 2010-2013 by Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
@@ -19,24 +18,3 @@
 # Free Software Foundation, Inc.,
 # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
-import os
-import sys
-
-PROG_NAME = "PyHoca-GUI"
-from pyhoca.wxgui.win32_logging import setup_win32log
-setup_win32log(PROG_NAME)
-
-from pyhoca.wxgui import __VERSION__
-from pyhoca.wxgui.launcher import PyHocaGUI_Launcher
-
-__author__ = "Mike Gabriel, Dick Kniep"
-__version__ = __VERSION__
-
-
-if __name__ == '__main__':
-    app = PyHocaGUI_Launcher()
-    app.setup_process()
-    app.setup_progname(PROG_NAME)
-    app.setup_devmode()
-    args, logger, liblogger = app.parseargs()
-    app.main(args=args, logger=logger, liblogger=liblogger)
diff --git a/pyhoca/wxgui/win32_logging.py b/pyhoca/mswin/win32_logging.py
similarity index 100%
rename from pyhoca/wxgui/win32_logging.py
rename to pyhoca/mswin/win32_logging.py

--
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