Skip to content

Commit

Permalink
debug travis-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
trolldbois committed Aug 8, 2015
1 parent b0bdeee commit d80717b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
9 changes: 5 additions & 4 deletions haystack/reverse/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# -*- coding: utf-8 -*-

import logging
import pickle
# import pickle
import dill

import numpy
import os
Expand Down Expand Up @@ -188,7 +189,7 @@ def cacheLoad(cls, memory_handler):
context_cache = config.get_cache_filename(config.CACHE_CONTEXT, dumpname)
try:
with file(context_cache, 'r') as fin:
context = pickle.load(fin)
context = dill.load(fin)
except EOFError as e:
os.remove(context_cache)
log.error(
Expand All @@ -211,8 +212,8 @@ def save(self):
self.dumpname)
try:
with file(context_cache, 'w') as fout:
pickle.dump(self, fout)
except pickle.PicklingError, e:
dill.dump(self, fout)
except dill.PicklingError, e:
log.error("Pickling error on %s, file removed",context_cache)
os.remove(context_cache)
raise e
Expand Down
11 changes: 6 additions & 5 deletions haystack/reverse/heuristics/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#

import logging
from haystack.abc import interfaces as intf
# from haystack.abc import interfaces as intf

log = logging.getLogger('model')

Expand All @@ -14,8 +14,9 @@ class FieldAnalyser(object):
"""
def __init__(self, memory_handler):
if not isinstance(memory_handler, intf.IMemoryHandler):
raise TypeError('memory_handler should be an IMemoryHandler')
# debug travis-ci
# if not isinstance(memory_handler, intf.IMemoryHandler):
# raise TypeError('memory_handler should be an IMemoryHandler')
self._memory_handler = memory_handler
self._target = self._memory_handler.get_target_platform()

Expand All @@ -38,8 +39,8 @@ class StructureAnalyser(object):
"""

def __init__(self, memory_handler):
if not isinstance(memory_handler, intf.IMemoryHandler):
raise TypeError('memory_handler should be an IMemoryHandler')
# if not isinstance(memory_handler, intf.IMemoryHandler):
# raise TypeError('memory_handler should be an IMemoryHandler')
self._memory_handler = memory_handler
self._target = self._memory_handler.get_target_platform()

Expand Down

0 comments on commit d80717b

Please sign in to comment.