[nanny] Add py2exe paths and check_win32_admin to clients
- From: Roberto Majadas <telemaco src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nanny] Add py2exe paths and check_win32_admin to clients
- Date: Sun, 23 Jan 2011 18:03:16 +0000 (UTC)
commit 848a59ce811e85beabdff0ae439169553965d08f
Author: Roberto Majadas <roberto majadas openshine com>
Date: Sat Sep 25 18:57:27 2010 +0200
Add py2exe paths and check_win32_admin to clients
client/gnome/admin/nanny-admin-console | 13 +++++++++----
client/gnome/admin/nanny-blacklist-manager | 19 +++++++++++++++++--
client/gnome/admin/nanny-desktop-blocker | 9 +++++----
3 files changed, 31 insertions(+), 10 deletions(-)
---
diff --git a/client/gnome/admin/nanny-admin-console b/client/gnome/admin/nanny-admin-console
index 696ec33..ebdd9c4 100644
--- a/client/gnome/admin/nanny-admin-console
+++ b/client/gnome/admin/nanny-admin-console
@@ -18,6 +18,7 @@
# USA
import os
+import sys
if os.name == "posix":
import syslog
@@ -26,10 +27,10 @@ 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)
+ if not hasattr(sys, "frozen") :
+ 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
@@ -45,6 +46,10 @@ if __name__ == '__main__':
if os.name == "posix":
syslog.syslog(syslog.LOG_INFO,"Booting nanny admin console")
+ if os.name == "nt":
+ import nanny.client.common.Utils
+ nanny.client.common.Utils.check_win32_admin()
+
try:
nanny_admin_console = nanny.client.gnome.admin.AdminConsole()
gtk.main()
diff --git a/client/gnome/admin/nanny-blacklist-manager b/client/gnome/admin/nanny-blacklist-manager
index 0bda49b..3f8216d 100644
--- a/client/gnome/admin/nanny-blacklist-manager
+++ b/client/gnome/admin/nanny-blacklist-manager
@@ -17,11 +17,21 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
# USA
-import syslog
+import os
+import sys
+if os.name == "posix":
+ import syslog
import gtk
import gettext
import __builtin__
+
+if os.name == "nt" :
+ if not hasattr(sys, "frozen") :
+ 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__':
@@ -31,7 +41,12 @@ if __name__ == '__main__':
#(options, args) = parser.parse_args()
__builtin__._ = gettext.gettext
+
+ if os.name == "posix":
+ syslog.syslog(syslog.LOG_INFO,"Booting nanny blacklist manager")
- syslog.syslog(syslog.LOG_INFO,"Booting nanny blacklist manager")
+ if os.name == "nt":
+ import nanny.client.common.Utils
+ nanny.client.common.Utils.check_win32_admin()
nanny_blacklist_manager = nanny.client.gnome.admin.BlacklistManager()
diff --git a/client/gnome/admin/nanny-desktop-blocker b/client/gnome/admin/nanny-desktop-blocker
index 31dd6e4..3e12e13 100644
--- a/client/gnome/admin/nanny-desktop-blocker
+++ b/client/gnome/admin/nanny-desktop-blocker
@@ -21,6 +21,7 @@
# USA
import os
+import sys
if os.name == "posix" :
import syslog
import gtk
@@ -28,10 +29,10 @@ 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)
+ if not hasattr(sys, "frozen") :
+ 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]