Show More
@@ -265,13 +265,17 def check_at_most_one_arg(opts, *args): | |||
|
265 | 265 | |
|
266 | 266 | Returns the unique argument or None if none of them were specified. |
|
267 | 267 | """ |
|
268 | ||
|
269 | def to_display(name): | |
|
270 | return name.replace(b'_', b'-') | |
|
271 | ||
|
268 | 272 | previous = None |
|
269 | 273 | for x in args: |
|
270 | 274 | if opts.get(x): |
|
271 | x = x.replace(b'_', b'-') | |
|
272 | 275 | if previous: |
|
273 | 276 | raise error.Abort( |
|
274 |
_(b'cannot specify both --%s and --%s') |
|
|
277 | _(b'cannot specify both --%s and --%s') | |
|
278 | % (to_display(previous), to_display(x)) | |
|
275 | 279 | ) |
|
276 | 280 | previous = x |
|
277 | 281 | return previous |
General Comments 0
You need to be logged in to leave comments.
Login now