Index: /trunk/tools/czartool/Pantasks.pm
===================================================================
--- /trunk/tools/czartool/Pantasks.pm	(revision 28833)
+++ /trunk/tools/czartool/Pantasks.pm	(revision 28834)
@@ -20,5 +20,4 @@
         "summitcopy"
         );
-
 
 ###########################################################################
@@ -61,4 +60,23 @@
 ###########################################################################
 #
+# Checks for a meaningful response from pantasks client 
+#
+###########################################################################
+sub outputOk {
+    my ($self, $output) = @_;
+
+    if (
+            $output =~ m/.*show\.labels.*/i ||
+            $output =~ m/.*Connection reset by peer.*/i ||
+            $output =~ m/.*server is busy.*/i ) { 
+
+        print "* WARNING: pantasks returned '$output'\n";
+        return 0;
+    }
+    return 1;
+}
+
+###########################################################################
+#
 # Gets labels for provided server 
 #
@@ -77,10 +95,6 @@
         if ($line =~ m/pantasks:\s+(.*)/) {
 
-            # HACK quit if we get 'show.labels: Command not found.'
-            if ($1 =~ m/.*show\.labels.*/i) {return \@labels;};
-            # HACK quit if we get 'Connection reset by peer'
-            if ($1 =~ m/.*Connection reset by peer.*/i) {return \@labels;};
-            # HACK quit if we get 'server is busy' message
-            if ($1 =~ m/.*server is busy.*/i) {return \@labels;};
+            if (!$self->outputOk($1)) {return \@labels;}
+
             # HACK to get around 'dummy' label in stdscience
             if ($1 !~ m/.*dummy.*/) {push(@labels, $1);};
