Commit 8d4e96d
fix(apiclient): fixed empty ConvertIDN request
function __autoIDNConvert in class hexonet.apiconnector.apiclient.APIClient
would send an empty ConvertIDN request, if cmd contains at least one
key that matches r'^(DOMAIN|NAMESERVER|DNSZONE)([0-9]*)$', but all
values at such keys match r'^[a-z0-9.-]+$'
the result of an empty ConvertIDN request would never result in a change
of cmd and thus can be avoided.
this commit adds a check `if not toconvert` just before sending the
(empty) request in order to avoid it. for readability, the now redundant
check `if not key.count` is removed.1 parent 63477ea commit 8d4e96d
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
422 | | - | |
423 | | - | |
424 | 422 | | |
425 | 423 | | |
426 | 424 | | |
427 | 425 | | |
428 | 426 | | |
| 427 | + | |
| 428 | + | |
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
| |||
0 commit comments