git-cl: Use open instead of file.

file does not exist on Python 3.

Change-Id: I9392fd797b730784cff4d1144c5a3ab1027c7dd8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2086493
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
diff --git a/git_cl.py b/git_cl.py
index fcb0d54..5cf3b16 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -2781,7 +2781,7 @@
     # Next, maybe fill in OWNERS coverage gaps to either tbrs/reviewers.
     if add_owners_to:
       owners_db = owners.Database(change.RepositoryRoot(),
-                                  fopen=file, os_path=os.path)
+                                  fopen=open, os_path=os.path)
       missing_files = owners_db.files_not_covered_by(change.LocalPaths(),
                                                      (tbrs | reviewers))
       LOOKUP[add_owners_to].update(
@@ -4944,7 +4944,7 @@
   if options.show_all:
     for arg in args:
       base_branch = cl.GetCommonAncestorWithUpstream()
-      database = owners.Database(settings.GetRoot(), file, os.path)
+      database = owners.Database(settings.GetRoot(), open, os.path)
       database.load_data_needed_for([arg])
       print('Owners for %s:' % arg)
       for owner in sorted(database.all_possible_owners([arg], None)):
@@ -4963,7 +4963,7 @@
   affected_files = [f.LocalPath() for f in change.AffectedFiles()]
 
   if options.batch:
-    db = owners.Database(change.RepositoryRoot(), file, os.path)
+    db = owners.Database(change.RepositoryRoot(), open, os.path)
     print('\n'.join(db.reviewers_for(affected_files, author)))
     return 0
 
@@ -4972,7 +4972,7 @@
       change.RepositoryRoot(),
       author,
       [] if options.ignore_current else cl.GetReviewers(),
-      fopen=file, os_path=os.path,
+      fopen=open, os_path=os.path,
       disable_color=options.no_color,
       override_files=change.OriginalOwnersFiles(),
       ignore_author=options.ignore_self).run()