airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Diogo Franco (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AIRFLOW-1450) FileSensor operator in contrib is always True
Date Mon, 24 Jul 2017 23:57:00 GMT

     [ https://issues.apache.org/jira/browse/AIRFLOW-1450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Diogo Franco updated AIRFLOW-1450:
----------------------------------
    Description: 
The *FileSensor* operator in _contrib_ returns True regardless of whether the file exists.

{code:java}
try:
    files = [f for f in walk(full_path)]
except:
    return False
return True
{code}

Iterating over the _walk(full_path)_ generator simply returns an empty list when _full_path_
does not exist, instead of an exception.


  was:
FileSensor operator in contrib returns True regardless of whether the file exists.

{code:java}
try:
    files = [f for f in walk(full_path)]
except:
    return False
return True
{code}

Iterating over the *walk(full_path)* generator simply returns an empty list when *full_path*
does not exist, instead of an exception.



> FileSensor operator in contrib is always True
> ---------------------------------------------
>
>                 Key: AIRFLOW-1450
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-1450
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: contrib
>            Reporter: Diogo Franco
>            Priority: Minor
>
> The *FileSensor* operator in _contrib_ returns True regardless of whether the file exists.
> {code:java}
> try:
>     files = [f for f in walk(full_path)]
> except:
>     return False
> return True
> {code}
> Iterating over the _walk(full_path)_ generator simply returns an empty list when _full_path_
does not exist, instead of an exception.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message