make _fetchstream() optional in people.User().fetchguid() so user data can be fetched...
authorCYBERDEViLNL <CYBERDEViLNL@github.com>
Fri, 6 Apr 2018 13:43:15 +0000 (15:43 +0200)
committerCYBERDEViLNL <CYBERDEViLNL@github.com>
Fri, 6 Apr 2018 13:43:15 +0000 (15:43 +0200)
diaspy/people.py

index a37c82c7f00d24f71dd5a1ebf99904569f9245dc..3d618d7674e2d8aea7d380a115ea20a94333461f 100644 (file)
@@ -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')