def parseRange(text):
    articles = text.split('-')
    if len(articles) == 1:
        try:
            a = int(articles[0])
            return a, a
        except __HOLE__:
            return None, None
    elif len(articles) == 2:
        try:
            if len(articles[0]):
                l = int(articles[0])
            else:
                l = None
            if len(articles[1]):
                h = int(articles[1])
            else:
                h = None
        except ValueError:
            return None, None
    return l, h
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/news/nntp.py/parseRange