chiark / gitweb /
always insist on knowing the island name
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 5 Sep 2010 11:37:04 +0000 (12:37 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 5 Sep 2010 11:37:04 +0000 (12:37 +0100)
src/com/tedpearson/ypp/market/MarketUploader.java

index 4254f00..2466b44 100644 (file)
@@ -438,6 +438,11 @@ public class MarketUploader implements TopLevelWindowListener, GUIInitializedLis
                    latch.await(2, java.util.concurrent.TimeUnit.SECONDS);
                }
 
+               if (islandName == null) {
+                   error("Could not find island name in YPP user interface.");
+                   return;
+               }
+
                progresslog("table check...");
 
                String headings_expected[] = new String[]
@@ -497,11 +502,7 @@ public class MarketUploader implements TopLevelWindowListener, GUIInitializedLis
                        progressNote(pm, "Yarrg: Uploading");
                        progresslog("yarrg upload...");
 
-                       if (islandName != null) {
-                               doneyarrg = runYarrg(yarrgts, oceanName, islandName, yarrgdata);
-                       } else {
-                               System.out.println("Couldn't upload to Yarrg - no island name found");
-                       }
+                       doneyarrg = runYarrg(yarrgts, oceanName, islandName, yarrgdata);
                        progresslog("yarrg done.");
                }