0

I cannot figure out how to get the first element of the result from calling one of the boto emr APIs:

describe_jobflows()

i know it returns a list of jobflows, but when I'm trying to access it by using :

jobflows[0]

I got this:

ERROR: 'JobFlow' object is not iterable

Can anyone help please?

Fisher Coder
  • 3,278
  • 12
  • 49
  • 84

1 Answers1

0

All right. Problem solved.

I was doing:

jobflows += terminatedjobflows[0]

that's why it's complaining: object jobflow is not iterable

when I changed it to:

jobflow.append(terminatedjobflows[0])

it works.

Pang
  • 9,564
  • 146
  • 81
  • 122
Fisher Coder
  • 3,278
  • 12
  • 49
  • 84