def getid(obj):
    try:
        return obj.id
    except AttributeError:
        return obj
Parses a patch from a list of lines.
dataset/ETHPy150Open kwminnick/rackspace-dns-cli/dnsclient/base.py/getid--crossover with--dataset/ETHPy150Open rietveld-codereview/rietveld/codereview/patching.py/ParsePatchToChunks