Guest User

Untitled

a guest
Mar 22nd, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3. from __future__ import print_function
  4.  
  5. import time
  6. import bugzilla
  7. import sys
  8.  
  9. if sys.version_info[0] >= 3:
  10. api_key = input("Enter Bugzilla API Key: ")
  11. else:
  12. api_key = raw_input("Enter Bugzilla API Key: ")
  13.  
  14. URL = "bugzilla.mozilla.org"
  15.  
  16. bzapi = bugzilla.Bugzilla(URL, api_key=api_key)
  17. assert bzapi.logged_in
  18.  
  19. query = bzapi.build_query(
  20. product="Enterprise Information Security",
  21. component="Vulnerability Assessment")
  22. query["status"] = "FIXED"
  23.  
  24. t1 = time.time()
  25. bugs = bzapi.query(query)
  26. t2 = time.time()
  27. print("Found %d bugs with our query" % len(bugs))
  28. print("Query processing time: %s" % (t2 - t1))
Add Comment
Please, Sign In to add comment