Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to fix the watchdog wrapper. #96

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions tools/watchdog/watchdog_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,22 @@
import sys

# Variable templates
LIBDIR = '/usr/local/lib'
LIBDIRS = ['/usr/local/lib', '/usr/lib']
PROGRAM_PATH = 'watchdog.main'
NEEDS_GTK=False
NEEDS_GST=False

try:
# setup the project root
dir = os.path.dirname(os.path.abspath(__file__))
if os.path.exists(os.path.join(dir, '..', 'flumotion', '.svn')) or \
os.path.exists(os.path.join(dir, '..', '.git')):
root = os.path.split(dir)[0]

if os.path.exists(os.path.join(dir, '..', 'flumotion', '.git')):
sys.path.insert(0, os.path.join(dir, '..', 'flumotion'))
else:
root = os.path.join(LIBDIR, 'flumotion', 'python')
sys.path.insert(0, root)
for libdir in LIBDIRS:
full_libdir = os.path.join(libdir, 'flumotion', 'python')
if os.path.exists(full_libdir):
sys.path.insert(0, full_libdir)

import warnings
warnings.filterwarnings('ignore', category=UserWarning)
Expand Down