def listShares(self, user, channel, msg): ''' Get shares by creator ''' shares = Share.by_creator(msg.lower()) if shares is not None and 0 < len(shares): for share in shares: self.display(user, channel, str(share)) else: self.display(user, channel, "No shares created by '%s'" % msg.lower())