skip non-files when consuming events synced from isolated hosts

see: https://github.com/ansible/awx/issues/6675
This commit is contained in:
Ryan Petrello
2020-04-13 10:14:10 -04:00
parent eeab4b90a5
commit 9843e21632

View File

@@ -280,7 +280,7 @@ class IsolatedManager(object):
if os.path.exists(events_path):
for event in set(os.listdir(events_path)) - self.handled_events:
path = os.path.join(events_path, event)
if os.path.exists(path):
if os.path.exists(path) and os.path.isfile(path):
try:
event_data = json.load(
open(os.path.join(events_path, event), 'r')