summaryrefslogtreecommitdiffstats
path: root/llvm/utils/git-svn/git-llvm
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/utils/git-svn/git-llvm')
-rwxr-xr-xllvm/utils/git-svn/git-llvm9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/utils/git-svn/git-llvm b/llvm/utils/git-svn/git-llvm
index d4c50a5d04b..d216614de52 100755
--- a/llvm/utils/git-svn/git-llvm
+++ b/llvm/utils/git-svn/git-llvm
@@ -617,5 +617,14 @@ if __name__ == '__main__':
VERBOSE = args.verbose
QUIET = args.quiet
+ # Python3 workaround, for when not arguments are provided.
+ # See https://bugs.python.org/issue16308
+ try:
+ func = args.func
+ except AttributeError:
+ # No arguments or subcommands were given.
+ parser.print_help()
+ parser.exit()
+
# Dispatch to the right subcommand
args.func(args)
OpenPOWER on IntegriCloud