Changeset 28834
- Timestamp:
- Aug 3, 2010, 9:30:38 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/tools/czartool/Pantasks.pm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/czartool/Pantasks.pm
r28829 r28834 20 20 "summitcopy" 21 21 ); 22 23 22 24 23 ########################################################################### … … 61 60 ########################################################################### 62 61 # 62 # Checks for a meaningful response from pantasks client 63 # 64 ########################################################################### 65 sub outputOk { 66 my ($self, $output) = @_; 67 68 if ( 69 $output =~ m/.*show\.labels.*/i || 70 $output =~ m/.*Connection reset by peer.*/i || 71 $output =~ m/.*server is busy.*/i ) { 72 73 print "* WARNING: pantasks returned '$output'\n"; 74 return 0; 75 } 76 return 1; 77 } 78 79 ########################################################################### 80 # 63 81 # Gets labels for provided server 64 82 # … … 77 95 if ($line =~ m/pantasks:\s+(.*)/) { 78 96 79 # HACK quit if we get 'show.labels: Command not found.' 80 if ($1 =~ m/.*show\.labels.*/i) {return \@labels;}; 81 # HACK quit if we get 'Connection reset by peer' 82 if ($1 =~ m/.*Connection reset by peer.*/i) {return \@labels;}; 83 # HACK quit if we get 'server is busy' message 84 if ($1 =~ m/.*server is busy.*/i) {return \@labels;}; 97 if (!$self->outputOk($1)) {return \@labels;} 98 85 99 # HACK to get around 'dummy' label in stdscience 86 100 if ($1 !~ m/.*dummy.*/) {push(@labels, $1);};
Note:
See TracChangeset
for help on using the changeset viewer.
