@@ -385,13 +385,15 @@ def _cache_from_guid(self, guid):
385385 def my_logs (self , log_type = None , limit = float ('inf' )):
386386 """Get an iterable of the logged-in user's logs.
387387
388- :param log_type: The log type to search for. Use the ``.value`` attribute of a :class:`~.log.Type` value.
388+ :param log_type: The log type to search for. Use a :class:`~.log.Type` value.
389389 If set to ``None``, all logs will be returned (default: ``None``).
390390 :param limit: The maximum number of results to return (default: infinity).
391391 """
392392 logging .info ("Getting {} of my logs of type {}" .format (limit , log_type ))
393393 url = self ._urls ['my_logs' ]
394394 if log_type is not None :
395+ if isinstance (log_type , LogType ):
396+ log_type = log_type .value
395397 url += '?lt={lt}' .format (lt = log_type )
396398 cache_table = self ._request (url ).find (class_ = 'Table' )
397399 if cache_table is None : # no finds on the account
@@ -414,11 +416,11 @@ def my_finds(self, limit=float('inf')):
414416
415417 :param limit: The maximum number of results to return (default: infinity).
416418 """
417- return self .my_logs (LogType .found_it . value , limit )
419+ return self .my_logs (LogType .found_it , limit )
418420
419421 def my_dnfs (self , limit = float ('inf' )):
420422 """Get an iterable of the logged-in user's DNFs.
421423
422424 :param limit: The maximum number of results to return (default: infinity).
423425 """
424- return self .my_logs (LogType .didnt_find_it . value , limit )
426+ return self .my_logs (LogType .didnt_find_it , limit )
0 commit comments