Skip to content

Commit

Permalink
Merge pull request #82 from viorelsfetea/master
Browse files Browse the repository at this point in the history
Update pipeline module import to no longer fail on ImportError, but if the module doesn't exist
  • Loading branch information
AngryBrock committed Feb 22, 2016
2 parents dcc2b8a + 42f245e commit 6e103ac
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions python/src/mapreduce/base_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,20 @@
# pylint: disable=g-import-not-at-top

import httplib
import importlib
import logging
import pkgutil

try:
import json
except ImportError:
import simplejson as json

try:
from mapreduce import pipeline_base
except ImportError:
pipeline_base = None
pipeline_base = None

if pkgutil.find_loader('mapreduce.pipeline_base') is not None:
pipeline_base = importlib.import_module('mapreduce.pipeline_base')

try:
# Check if the full cloudstorage package exists. The stub part is in runtime.
import cloudstorage
Expand Down

0 comments on commit 6e103ac

Please sign in to comment.