This PR fixes an issue where the [p]yourls stats command would error out. The root cause is in the call to YOURLS' stats method: when the limit value is more than the number of shorten URLs, it would raise a KeyError. This call is made by cmdStats in cog yourlsClient (which basically means [p]yourls stats) which always specifies a limit of 3.
Description of the changes
This PR fixes an issue where the
[p]yourls stats
command would error out. The root cause is in the call to YOURLS'stats
method: when thelimit
value is more than the number of shorten URLs, it would raise aKeyError
. This call is made bycmdStats
in cogyourlsClient
(which basically means[p]yourls stats
) which always specifies alimit
of 3.This resolves #641 .
Have the changes in this PR been tested?
Yes
Testing