From af79ac4a0ad2b538b17baf3e0b89a4494ff07522 Mon Sep 17 00:00:00 2001 From: Johan Berggren Date: Wed, 23 Sep 2015 15:06:52 +0200 Subject: [PATCH] Travis dont have Plaso --- .travis.yml | 2 -- timesketch/lib/tasks.py | 8 +++++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6e13bef77d..f0e54972e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,6 @@ language: python python: - "2.7" -before_install: - - if test `uname -s` = 'Linux'; then sudo add-apt-repository ppa:gift/stable -y && sudo add-apt-repository universe -y && sudo apt-get update -q && sudo apt-get install python-plaso; fi # command to install dependencies install: - "pip install ." diff --git a/timesketch/lib/tasks.py b/timesketch/lib/tasks.py index 4ccdfda00f..b0ee519302 100644 --- a/timesketch/lib/tasks.py +++ b/timesketch/lib/tasks.py @@ -17,7 +17,13 @@ import sys from flask import current_app -from plaso.frontend import psort +# We currently don't have plaso in our Travis setup. This is a workaround +# for that until we fix the Travis environment. +# TODO: Add Plaso to our Travis environment we are running our tests in. +try: + from plaso.frontend import psort +except ImportError: + pass from timesketch import create_celery_app