def articleWork(self, article, cmd, func):
        if self.currentGroup is None:
            self.sendLine('412 no newsgroup has been selected')
        else:
            if not article:
                if self.currentIndex is None:
                    self.sendLine('420 no current article has been selected')
                else:
                    article = self.currentIndex
            else:
                if article[0] == '<':
                    return func(self.currentGroup, index = None, id = article)
                else:
                    try:
                        article = int(article)
                        return func(self.currentGroup, article)
                    except __HOLE__:
                        self.sendLine('501 command syntax error')
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/news/nntp.py/NNTPServer.articleWork