opsgenie/opsgenie-python-sdk

Issue in found on Python 2.7

Opened this issue · 0 comments

When I run the sdk on Python 2.7, I have to put the followings in observer.py. Otherwise, error is found.

import sys
import abc

if sys.version_info >= (3, 4):
ABC = abc.ABC
else:
ABC = abc.ABCMeta('ABC', (), {})

class Observer(ABC):
"""
An updating interface for objects, to whom metrics should be published.
The published metrics can be accessed in a named tuple at publisher.data in the notify function.
"""

@abc.abstractmethod
def notify(self, publisher):
    pass