From 5ef21061d51eeaedf1c8b1f134cd00dcae140de3 Mon Sep 17 00:00:00 2001 From: CYBERDEViLNL Date: Fri, 6 Apr 2018 15:43:15 +0200 Subject: [PATCH] make _fetchstream() optional in people.User().fetchguid() so user data can be fetched without fetching the stream, default set to True --- diaspy/people.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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') -- 2.25.1