Skip to content

Commit

Permalink
Introduce nested limit checks
Browse files Browse the repository at this point in the history
  • Loading branch information
b10n1k committed May 22, 2019
1 parent 5d2fec5 commit 1836d8a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
5 changes: 5 additions & 0 deletions .perlcriticrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@ severity = 5

[Perl::Critic::Policy::ConsistentQuoteLikeWords]
severity = 5

[ControlStructures::ProhibitDeepNests]
severity = 4
add_themes = freenode
max_nests = 4
30 changes: 17 additions & 13 deletions lib/registration.pm
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,22 @@ sub verify_preselected_modules {
die 'Scroll reached to bottom not finding individual needles for each module.' if @needles;
}

sub _yast_scc_addons_handler {
if (match_has_tag('yast_scc-license-dialog')) {
send_key 'alt-a';
next;
}
# yast may pop up dependencies or reboot prompt window
if (match_has_tag('yast_scc-automatic-changes') or match_has_tag('unsupported-packages') or match_has_tag('yast_scc-prompt-reboot')) {
wait_screen_change { send_key "alt-o" };
next;
}
if (match_has_tag('yast_scc-installation-summary')) {
send_key 'alt-f';
last;
}
}

sub process_scc_register_addons {
# The value of SCC_ADDONS is a list of abbreviation of addons/modules
# Following are abbreviations defined for modules and some addons
Expand Down Expand Up @@ -353,19 +369,7 @@ sub process_scc_register_addons {
['yast_scc-license-dialog', 'yast_scc-automatic-changes', 'yast_scc-prompt-reboot', 'yast_scc-installation-summary'], 1800
))
{
if (match_has_tag('yast_scc-license-dialog')) {
send_key 'alt-a';
next;
}
# yast may pop up dependencies or reboot prompt window
if (match_has_tag('yast_scc-automatic-changes') or match_has_tag('unsupported-packages') or match_has_tag('yast_scc-prompt-reboot')) {
wait_screen_change { send_key "alt-o" };
next;
}
if (match_has_tag('yast_scc-installation-summary')) {
send_key 'alt-f';
last;
}
_yast_scc_addons_handler();
}
last;
}
Expand Down

0 comments on commit 1836d8a

Please sign in to comment.