title: Recursive function returning none in Python
body: <p>I have this piece of code, for some reason when I try to return the path, I get <code>None</code> instead:</p>
  <pre><code>def get_path(dictionary, rqfile, prefix=[]):        
      for filename in dictionary.keys():
          path = prefix + [filename]
          if not isinstance(dictionary[filename], dict):          
              if rqfile in str(os.path.join(*path)):
                  return str(os.path.join(*path))
          else:
              get_path(directory[filename], rqfile, path)
  </code></pre>
  <p>Is there a way to solve this?</p>