From: CYBERDEViLNL Date: Fri, 6 Apr 2018 13:43:15 +0000 (+0200) Subject: make _fetchstream() optional in people.User().fetchguid() so user data can be fetched... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5ef21061d51eeaedf1c8b1f134cd00dcae140de3;p=diaspy.git make _fetchstream() optional in people.User().fetchguid() so user data can be fetched without fetching the stream, default set to True --- diff --git a/diaspy/people.py b/diaspy/people.py index a37c82c..3d618d7 100644 --- a/diaspy/people.py +++ b/diaspy/people.py @@ -127,13 +127,13 @@ class User(): self._postproc(request) self._fetchstream() - def fetchguid(self): - """Fetch user data and posts using guid. + def fetchguid(self, fetch_stream=True): + """Fetch user data and posts (if fetch_stream is True) using guid. """ if self['guid']: request = self._connection.get('people/{0}.json'.format(self['guid'])) self._postproc(request) - self._fetchstream() + if fetch_stream: self._fetchstream() else: raise errors.UserError('GUID not set')