Skip to content

Commit

Permalink
Removed reliance on Python 3.6's AbstractContextManager
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentRDC committed Apr 13, 2018
1 parent 2dce692 commit cebe42c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions iris/raw.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"""
from abc import abstractmethod
from collections import OrderedDict
from contextlib import AbstractContextManager
from functools import partial

import numpy as np
Expand All @@ -15,7 +14,7 @@

from .meta import ExperimentalParameter, MetaRawDataset

class AbstractRawDataset(AbstractContextManager, metaclass = MetaRawDataset):
class AbstractRawDataset(object, metaclass = MetaRawDataset):
"""
Abstract base class for ultrafast electron diffraction data set.
RawDatasetBase allows for enforced metadata types and values,
Expand Down Expand Up @@ -78,6 +77,9 @@ def __init__(self, source = None, metadata = dict()):
if metadata:
self.update_metadata(metadata)

def __enter__(self):
return self

def __exit__(self, *exc):
pass

Expand Down

0 comments on commit cebe42c

Please sign in to comment.