[AIRFLOW-3635] Fix incorrect logic in detele_dag (introduced in PR#4406) (#4445)

Incorrect logic was introduced in PR #4406
(https://github.com/apache/airflow/pull/4406)

This was not found out because the Travis CI was not working as expected.
This commit is contained in:
Xiaodong 2019-01-06 13:56:21 +08:00 коммит произвёл Tao Feng
Родитель 94bfeef7cb
Коммит 7da9bb68ce
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -41,7 +41,7 @@ def delete_dag(dag_id, keep_records_in_log=True):
if dag is None:
raise DagNotFound("Dag id {} not found".format(dag_id))
if dag.fileloc and not os.path.exists(dag.fileloc):
if dag.fileloc and os.path.exists(dag.fileloc):
raise DagFileExists("Dag id {} is still in DagBag. "
"Remove the DAG file first: {}".format(dag_id, dag.fileloc))