[nanny] Add win32 paths to nanny-admin-console
- From: Roberto Majadas <telemaco src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nanny] Add win32 paths to nanny-admin-console
- Date: Sun, 23 Jan 2011 18:01:56 +0000 (UTC)
commit 9029a6bc6f99142afacee274a741ae03f64c4144
Author: Roberto Majadas <roberto majadas openshine com>
Date: Sat Sep 18 12:30:47 2010 +0200
Add win32 paths to nanny-admin-console
client/gnome/admin/nanny-admin-console | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/client/gnome/admin/nanny-admin-console b/client/gnome/admin/nanny-admin-console
index ad07171..696ec33 100644
--- a/client/gnome/admin/nanny-admin-console
+++ b/client/gnome/admin/nanny-admin-console
@@ -17,13 +17,23 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
# USA
-import syslog
+import os
+if os.name == "posix":
+ import syslog
+
import gtk
import gettext
import __builtin__
+if os.name == "nt" :
+ import sys
+ root_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+ nanny_lib_path = os.path.join(root_path, "lib", "python2.6", "site-packages")
+ sys.path.append(nanny_lib_path)
+
import nanny.client.gnome.admin
+
if __name__ == '__main__':
#parser = OptionParser()
#parser.add_option("-p", "--pid-file", dest="pid_file", help="pid File", metavar="PID_FILE")
@@ -32,7 +42,8 @@ if __name__ == '__main__':
__builtin__._ = gettext.gettext
- syslog.syslog(syslog.LOG_INFO,"Booting nanny admin console")
+ if os.name == "posix":
+ syslog.syslog(syslog.LOG_INFO,"Booting nanny admin console")
try:
nanny_admin_console = nanny.client.gnome.admin.AdminConsole()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]