Merge branch 'main' into avm99963-monorail

Merged commit 34d8229ae2b51fb1a15bd208e6fe6185c94f6266

GitOrigin-RevId: 7ee0917f93a577e475f8e09526dd144d245593f4
diff --git a/api/resource_name_converters.py b/api/resource_name_converters.py
index cb26c9b..3e305e4 100644
--- a/api/resource_name_converters.py
+++ b/api/resource_name_converters.py
@@ -1,7 +1,6 @@
-# Copyright 2020 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file or at
-# https://developers.google.com/open-source/licenses/bsd
+# Copyright 2020 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
 
 """Methods for converting resource names to protorpc objects and back.
 
@@ -23,7 +22,7 @@
 from framework import validate
 from project import project_constants
 from tracker import tracker_constants
-from proto import tracker_pb2
+from mrproto import tracker_pb2
 
 # Constants that hold regex patterns for resource names.
 PROJECT_NAME_PATTERN = (
@@ -126,7 +125,7 @@
   if misses:
     # Raise error with resource names rather than backend IDs.
     project_names_by_id = {
-        p_id: p_name for p_name, p_id in project_ids_by_name.iteritems()
+        p_id: p_name for p_name, p_id in project_ids_by_name.items()
     }
     misses_by_resource_name = [
         _ConstructIssueName(project_names_by_id[p_id], local_id)
@@ -427,7 +426,7 @@
         project_local_id_pairs.append(
             (match.group('project'), int(match.group('local_id'))))
       except exceptions.InputException as e:
-        err_agg.AddErrorMessage(e.message)
+        err_agg.AddErrorMessage(str(e))
   return _IssueIdsFromLocalIds(cnxn, project_local_id_pairs, services)
 
 
@@ -852,7 +851,7 @@
           parsed_comp_projectnames.append(
               (str(match.group('path')), project_name))
       except exceptions.InputException as e:
-        err_agg.AddErrorMessage(e.message)
+        err_agg.AddErrorMessage(str(e))
 
   # Validate as many projects as possible.
   project_names = {project_name for _, project_name in parsed_comp_projectnames}