diff --git a/dags/igneous_and_cloudvolume.py b/dags/igneous_and_cloudvolume.py index 5ed08d42..e747e8ca 100644 --- a/dags/igneous_and_cloudvolume.py +++ b/dags/igneous_and_cloudvolume.py @@ -334,9 +334,9 @@ def check_cloud_paths_empty(paths): for path in paths: cf = CloudFiles(path) obj = next(cf.list(), None) - if obj is not None: - slack_message(""":exclamation:*Error*: `{}` is not empty""".format(path)) - raise RuntimeError('Path already exist') + if obj is not None: + slack_message(""":exclamation:*Error*: `{}` is not empty""".format(path)) + raise RuntimeError('Path already exist') except: slack_message(""":exclamation:*Error*: Check cloud path failed: ```{}``` """.format(traceback.format_exc()))