From 699bb17627ad4103e47731034db5e9d1854043ff Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 27 Apr 2006 15:36:01 -0400 Subject: [PATCH] Work with both installed sugar and devel sources --- browser/browser.py | 8 ++++++-- chat/chat.py | 9 ++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/browser/browser.py b/browser/browser.py index 91386f28..64343db5 100755 --- a/browser/browser.py +++ b/browser/browser.py @@ -11,9 +11,13 @@ import gtk import geckoembed import sys -import activity -from sugar_globals import * +try: + import activity + from sugar_globals import * +except ImportError: + from sugar import activity + from sugar.sugar_globals import * class AddressToolbar(gtk.Toolbar): def __init__(self): diff --git a/chat/chat.py b/chat/chat.py index 590b65fe..3db15adb 100755 --- a/chat/chat.py +++ b/chat/chat.py @@ -14,7 +14,12 @@ import os import pwd import socket -import activity +try: + import activity + from sugar_globals import * +except ImportError: + from sugar import activity + from sugar.sugar_globals import * import presence import BuddyList @@ -22,8 +27,6 @@ import network import richtext import xmlrpclib -from sugar_globals import * - class Chat(activity.Activity): def __init__(self, controller):