diff --git a/napi b/napi index fc4724a..b7b0654 100755 --- a/napi +++ b/napi @@ -55,7 +55,9 @@ for movie_filename in args: response = urllib.urlopen(base_url, request_data) response_data = response.read() response_xml = XML(response_data) - if response_xml.find('status').text != 'success': + + response_status = response_xml.find('status') + if response_status is None or response_status.text != 'success': print "%s: No subtitles found" % (movie_filename,) continue