Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add script to map email addresses to launchpad IDs

  • Loading branch information...
commit e44bd207d469646e4da0dc80d95fd8a302bb9950 1 parent d198e47
@markmc authored
Showing with 26 additions and 0 deletions.
  1. +26 −0 launchpad/map-email-to-lp-name.py
View
26 launchpad/map-email-to-lp-name.py
@@ -0,0 +1,26 @@
+
+#
+# Attempt to find a launchpad name for every email address supplied:
+#
+# python map-email-to-lp-name.py foo@bar.com blaa@foo.com
+
+import argparse
+
+parser = argparse.ArgumentParser(description='List fixed bugs for a series')
+
+parser.add_argument('emails', metavar='EMAIL', nargs='+',
+ help='An email address to query')
+
+args = parser.parse_args()
+
+from launchpadlib.launchpad import Launchpad
+
+launchpad = Launchpad.login_with('openstack-dm', 'production')
+
+for email in args.emails:
+ try:
+ person = launchpad.people.getByEmail(email=email)
+ if person:
+ print person.name, email
+ except:
+ continue
Please sign in to comment.
Something went wrong with that request. Please try again.