findmissing: getopen: Print Change-Id associated with patch

Printing the Change-Id helps with finding a commit in Gerrit.

Unrelated changes mandated by repo:
- Disable useless MySQLdb import error reported by repo.
- Handle new repo complaint.
    Duplicate string formatting argument 'parsed_fixes',
			consider passing as named argument

BUG=None
TEST=Run getopen and observe output

Change-Id: Ibb2879e377dac9f5e2d07624a581638d044a8855
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/2606648
Reviewed-by: Curtis Malainey <cujomalainey@chromium.org>
Commit-Queue: Guenter Roeck <groeck@chromium.org>
Tested-by: Guenter Roeck <groeck@chromium.org>
diff --git a/contrib/findmissing/getopen.py b/contrib/findmissing/getopen.py
index 30068c6..25a2002 100755
--- a/contrib/findmissing/getopen.py
+++ b/contrib/findmissing/getopen.py
@@ -28,7 +28,7 @@
 
 import argparse
 import re
-import MySQLdb
+import MySQLdb # pylint: disable=import-error
 
 import common
 import git_interface
@@ -159,6 +159,11 @@
         handled_shas += [fixedby_sha]
 
         print('Upstream commit %s ("%s")' % (fixedby_sha, fixedby_description))
+
+        changeid = missing.get_change_id(db, fixedby_sha)
+        if changeid:
+            print('  CL:%s' % changeid)
+
         integrated = git_interface.get_integrated_tag(fixedby_sha)
         end = integrated
         if not integrated:
@@ -201,8 +206,8 @@
             # format query here since we are inserting n values
             q = """SELECT sha, description
                    FROM linux_upstream
-                   WHERE sha in ({})
-                   ORDER BY FIELD(sha, {})""".format(parsed_fixes, parsed_fixes)
+                   WHERE sha in ({sha})
+                   ORDER BY FIELD(sha, {sha})""".format(sha=parsed_fixes)
             c.execute(q)
             fixes = c.fetchall()
             print('    Fixed by:')