Skip to content

Commit

Permalink
Fix #315: Can't specify --user-filter or other string-valued args
Browse files Browse the repository at this point in the history
Turns out I misunderstood the use of nargs=1 in argparse: the default behavior is to consume exactly one value; if you specify nargs=1 then you get the single argument as a list containing the value rather than the value itself.
  • Loading branch information
adobeDan committed Dec 9, 2017
1 parent 51c9904 commit b12c678
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions user_sync/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ def process_args(args=None):
"the list is read from a file (see --adobe-only-user-action write-file). "
"When using this option, you must also specify what you want done with Adobe-only "
"users by also including --adobe-only-user-action and one of its arguments",
nargs=1,
metavar='input_path',
dest='adobe_only_user_list')
parser.add_argument('--connector',
Expand All @@ -175,7 +174,6 @@ def process_args(args=None):
parser.add_argument('--strategy',
help="whether to fetch and sync the Adobe directory against the customer directory "
"or just to push each customer user to the Adobe side. Default is to fetch and sync.",
nargs=1,
metavar='sync|push',
dest='strategy')
parser.add_argument('-t', '--test-mode',
Expand All @@ -189,7 +187,6 @@ def process_args(args=None):
parser.add_argument('--user-filter',
help='limit the selected set of users that may be examined for syncing, with the pattern '
'being a regular expression.',
nargs=1,
metavar='pattern',
dest='user_filter')
parser.add_argument('--users',
Expand Down

0 comments on commit b12c678

Please sign in to comment.