Skip to content

Commit

Permalink
Py35 doesn't have enum.auto, so just manually define values in error_…
Browse files Browse the repository at this point in the history
…responses.ErrorResponseType
  • Loading branch information
dougthor42 committed Feb 20, 2019
1 parent 2d7afa1 commit 5f58c9f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/trendlines/error_responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"""
"""
from enum import Enum
from enum import auto

from flask import jsonify

Expand All @@ -11,11 +10,11 @@


class ErrorResponseType(Enum):
NO_DATA = auto()
NOT_FOUND = auto()
INVALID_REQUEST = auto()
ALREADY_EXISTS = auto()
INTEGRETY_ERROR = auto()
NO_DATA = 1
NOT_FOUND = 2
INVALID_REQUEST = 3
ALREADY_EXISTS = 4
INTEGRETY_ERROR = 5

def __str__(self):
return self.name.lower().replace("_", "-")
Expand Down

0 comments on commit 5f58c9f

Please sign in to comment.