Skip to content

Commit

Permalink
Switch to argparse
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Mar 5, 2024
1 parent 9778d81 commit 1720675
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions git/setup_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
import os.path
import subprocess
import glob
from optparse import OptionParser
from argparse import ArgumentParser
import shutil

dev_tools_path = os.path.join("tools", "dev_tools")


opt = OptionParser()
opt.add_option("-g", "--global",
action="store_true", dest="glob", default=False,
help="Set global git settings instead of repo "
"settings [default]")
opt = ArgumentParser()
opt.add_argument("-g", "--global",
action="store_true", dest="glob", default=False,
help="Set global git settings instead of repo "
"settings [default]")

(options, args) = opt.parse_args()
args = opt.parse_args()

if options.glob:
if args.glob:
git_config = "git config --global --replace-all"
config_contents = ""
else:
Expand Down

0 comments on commit 1720675

Please sign in to comment.