Skip to content

Commit

Permalink
[AIRFLOW-370] Create AirflowConfigException in exceptions.py
Browse files Browse the repository at this point in the history
AirflowConfigException should be created in
the exceptions utility file, not in
configuration.py.

All exceptions should be created in
`exceptions.py`.

https://issues.apache.org/jira/browse/AIRFLOW-370

Closes apache#1689 from jlowin/refactor-exception
  • Loading branch information
jlowin authored and ldct committed Oct 30, 2016
1 parent 1660aa0 commit 5616c02
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 2 additions & 3 deletions airflow/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,15 @@
from collections import OrderedDict
from configparser import ConfigParser

from .exceptions import AirflowConfigException

# show Airflow's deprecation warnings
warnings.filterwarnings(
action='default', category=DeprecationWarning, module='airflow')
warnings.filterwarnings(
action='default', category=PendingDeprecationWarning, module='airflow')


class AirflowConfigException(Exception):
pass

try:
from cryptography.fernet import Fernet
except ImportError:
Expand Down
4 changes: 4 additions & 0 deletions airflow/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ class AirflowException(Exception):
pass


class AirflowConfigException(AirflowException):
pass


class AirflowSensorTimeout(AirflowException):
pass

Expand Down

0 comments on commit 5616c02

Please sign in to comment.