Ensures a nil location is not processed when enumerating usernames

This commit is contained in:
erwanlr
2014-08-15 22:54:17 +02:00
parent 30a07f037e
commit cebd808674
2 changed files with 11 additions and 0 deletions

View File

@@ -22,6 +22,8 @@ class WpUser < WpItem
if response.code == 301 # login in location?
location = response.headers_hash['Location']
return unless location
@login = Existable.login_from_author_pattern(location)
@display_name = Existable.display_name_from_body(
Browser.get(location).body