title: # Error: TypeError: argument of type 'bool' is not iterable #
body: <p>first post! I am fairly new to python and trying to improve, any help would be greatly appreciated! I've looked through other posts with similar questions still cant seem to get around this issue.</p>
  
  <p>This is the error I receive, which happens on <strong>line 5:</strong></p>
  
  <pre><code>    # Error: TypeError: argument of type 'bool' is not iterable # 
  </code></pre>
  
  <p>This is my code:</p>
  
  <pre><code>userInput = cmds.textFieldGrp(searchText, query = True, text=True)
  path = "D:\somefolder"
  for root, dirs, files in os.walk(path):
      for file in files:
          if (userInput in file.endswith('.ma')):
              print file
          else:
              break
              print "No files containing %s" (userInput)
  </code></pre>
  
  <p>Basically, I am trying to search for files in a directory based off keywords a user types in. </p>
  
  <p>Looking forward to hearing from anyone, thank you!</p>