diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-08-28 03:42:45 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-08-28 03:42:45 +0000 |
commit | 48852553b80159df530c47389ed0b520859754c4 (patch) | |
tree | b29e4048850678b82752fc4d015bf7d560355e8d | |
parent | 4709054e83977e49b6aae0120f0553ede08a640c (diff) | |
download | portage-48852553b80159df530c47389ed0b520859754c4.tar.gz portage-48852553b80159df530c47389ed0b520859754c4.tar.bz2 portage-48852553b80159df530c47389ed0b520859754c4.zip |
Convert myoptions from a list to a dict.
svn path=/main/trunk/; revision=7714
-rwxr-xr-x | bin/repoman | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/bin/repoman b/bin/repoman index a9540f534..ee36faea4 100755 --- a/bin/repoman +++ b/bin/repoman @@ -350,7 +350,7 @@ def last(): sys.exit(1) mymode=None -myoptions=[] +myoptions = {} if len(sys.argv)>1: x=1 while x < len(sys.argv): @@ -375,8 +375,8 @@ if len(sys.argv)>1: verbose+=1 elif (optionx=="--quiet"): quiet+=1 - elif optionx not in myoptions: - myoptions.append(optionx) + else: + myoptions[optionx] = True else: err_help("\""+sys.argv[x]+"\" is not a valid mode or option.") x=x+1 @@ -389,8 +389,7 @@ if ("--version" in myoptions): if mymode=="last" or (mymode=="lfull"): last() if mymode == "commit": - while "--ignore-masked" in myoptions: - myoptions.remove("--ignore-masked") + myoptions.pop("--ignore-masked", None) from portage import normalize_path isCvs=False @@ -403,7 +402,7 @@ if mymode == "commit" and \ "--pretend" not in myoptions: print print darkgreen("Not in a CVS repository; enabling pretend mode.") - myoptions.append("--pretend"); + myoptions["--pretend"] = True def have_profile_dir(path, maxdepth=3): |