From: Marek Marecki Date: Sat, 6 Jul 2013 20:25:33 +0000 (+0200) Subject: `Search().lookup_user()` now returns response code (just in case X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a34d1853a32a15c14a2c21ca87f3afb8cd9c3fb5;p=diaspy.git `Search().lookup_user()` now returns response code (just in case somebody would find it useful) --- diff --git a/diaspy/search.py b/diaspy/search.py index 7467295..6da1beb 100644 --- a/diaspy/search.py +++ b/diaspy/search.py @@ -12,9 +12,10 @@ class Search(): def lookup_user(self, handle): """This function will launch a webfinger lookup from the pod for the - handle requested. Nothing is returned but if the lookup was successful, - user should soon be searchable via this pod. - + handle requested. Response code is returned and if the lookup was successful, + user should soon be searchable via pod used for connection. + :param string: Handle to search for. """ - request = self.get('people', headers={'accept': 'text/html'}, params={'q':handle}) + request = self.get('people', headers={'accept': 'text/html'}, params={'q': handle}) + return request.status_code