Переглянути джерело

git-map-branches: Fix Python 3 errors.

When no -v flag is given, the verbosity defaults to None instead of 0,
so set 0 as a default.

Bug: 1058315
Change-Id: Id69e62550b33cd18bb1e5aed9cdc3c94f1488516
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2088193
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Edward Lemur 5 роки тому
батько
коміт
2bac03e8a1
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      git_map_branches.py

+ 1 - 1
git_map_branches.py

@@ -324,7 +324,7 @@ def main(argv):
     print_desc()
     print_desc()
 
 
   parser = argparse.ArgumentParser()
   parser = argparse.ArgumentParser()
-  parser.add_argument('-v', action='count',
+  parser.add_argument('-v', action='count', default=0,
                       help=('Pass once to show tracking info, '
                       help=('Pass once to show tracking info, '
                             'twice for hash and review url, '
                             'twice for hash and review url, '
                             'thrice for review status'))
                             'thrice for review status'))