#!/usr/bin/env python
import getpass
from launchpadlib.launchpad import Launchpad
import os
username = getpass.getuser()
teamname = 'ubuntu-server'
# Distribution List: https://launchpad.net/distros
distribution = 'Ubuntu'
cachedir = os.path.join('/home', username, '.launchpadlib/cache/')
# Fails with Python3 due to lp# 1583741
launchpad = Launchpad.login_with(username, 'production', cachedir)
# API Doc: https://launchpad.net/+apidoc/1.0.html
project = launchpad.distributions[distribution]
team = launchpad.people[teamname]
bugs = project.searchTasks(structural_subscriber=team,
modified_since='2016-09-09')