From 889a2d57106f5d67a732da589a768e5065851502 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Tue, 20 Oct 2009 21:02:21 +0000 Subject: [PATCH] allow loading module from working copy if osc is not installed --- fuse/fuseosc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/fuse/fuseosc b/fuse/fuseosc index 87c80e62..08489eac 100755 --- a/fuse/fuseosc +++ b/fuse/fuseosc @@ -23,13 +23,20 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. -import osc -import osc.conf -import osc.core import sys +import os +try: + import osc + import osc.conf + import osc.core +except: + # allow loading module from working copy if osc is not installed + sys.path.append(os.path.abspath(os.path.dirname(sys.argv[0]) + '/../osc')) + import osc + import osc.conf + import osc.core import fuse import stat -import os import errno import tempfile