Skip to content

Commit

Permalink
Update pipeline module import to no longer fail on ImportError, but i…
Browse files Browse the repository at this point in the history
…f the module doesn't exist
  • Loading branch information
Viorel Sfetea committed Nov 17, 2015
1 parent e0d79c8 commit 3984a5c
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 @@ -23,16 +23,19 @@

import httplib
import logging
import pkgutil
import importlib

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 3984a5c

Please sign in to comment.