def getLicense(photoInfo):
    """Returns a license string for a photo.

    Keyword arguments:
    photoInfo -- the photo info as return by the Flickr getInfo API call
    """

    licenses = [
        "All Rights Reserved"
        "CC BY-NC-SA (Attribution-NonCommercial-ShareAlike) License",
        "CC BY-NC (Attribution-NonCommercial) License",
        "CC BY-NC-ND (Attribution-NonCommercial-NoDerivs) License",
        "CC BY (Attribution) License",
        "CC BY-SA (Attribution-ShareAlike) License",
        "CC BY-ND (Attribution-NoDerivs) License",
        "No known copyright restrictions",
        "United States Government Work",
        "Public Domain Dedication (CC0)",
        "Public Domain Mark"
    ]
    return licenses[int(photoInfo.get('license'))]