Assorted bugs to get AU E2E test working with paygen suite.

1) Fixed a bug from a previous CL introduced that returned from an omaha
ping before we processed it for remote info (autoupdate.py)
2) If we expect a single item returned from gsutil but get multiple,
if the name we gave matches one exactly, return that.

BUG=chromium:267896
TEST=Ran it with unittests + AU E2E test with paygen test.

Change-Id: Ifd1266d9050824ad397df3bf80a1d314f01610db
Reviewed-on: https://gerrit.chromium.org/gerrit/66140
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Joy Chen <joychen@chromium.org>
Commit-Queue: Chris Sosa <sosa@chromium.org>
diff --git a/autoupdate.py b/autoupdate.py
index 52b752d..6507cdc 100644
--- a/autoupdate.py
+++ b/autoupdate.py
@@ -711,16 +711,16 @@
     # Parse the XML we got into the components we care about.
     protocol, app, event, update_check = autoupdate_lib.ParseUpdateRequest(data)
 
+    # Process attributes of the update check.
+    forced_update_label, client_version, board = self._ProcessUpdateComponents(
+        app, event)
+
     if not update_check:
       # TODO(sosa): Generate correct non-updatecheck payload to better test
       # update clients.
       _Log('Non-update check received.  Returning blank payload')
       return autoupdate_lib.GetNoUpdateResponse(protocol)
 
-    # Process attributes of the update check.
-    forced_update_label, client_version, board = self._ProcessUpdateComponents(
-        app, event)
-
     if forced_update_label:
       if label:
         _Log('Label: %s set but being overwritten to %s by request', label,
@@ -748,7 +748,7 @@
           label = self.payload_path
 
         # TODO(sosa): Remove backwards-compatible hack.
-        if not label.endswith('.bin'):
+        if not '.bin' in label:
           url = _NonePathJoin(static_urlbase, label, 'update.gz')
         else:
           url = _NonePathJoin(static_urlbase, label)