Fix for unicode payload_url passed to nebraska_wrapper.py

NebraskaWrapper can now take either a single payload_url or a list of
payload_url's to handle DLCs together with platform payloads. When
normalizing payload_url to be a list, we were explicitly checking if
payload_url was a string. However when the tests run in the lab,
payload_url ends up being a unicode string, so it wasn't properly
normalized into a list and all the further operations were being done on
single characters of the URL. To fix this, change the normalization step
to just check if payload_url isn't None or a list, so we don't have to
worry about what kind of string we're getting.

BUG=chromium:1099918
TEST=autoupdate_FromUI.full, autoupdate_DataPreserved.Full,
autoupdate_NonBlockingOOBEUpdate.delta, and the same tests modified with
payload_url = unicode(payload_url). Example test command:
test_that chromeos6-row12-rack23-host17.cros autoupdate_FromUI.full -b atlas -i 'atlas-release/R85-13308.0.0' --no-retry --autotest_dir ~/trunk/src/third_party/autotest/files --args="job_repo_url=http://100.115.168.195:8082/static/atlas-release/R85-13308.0.0/autotest/packages"

Change-Id: I5f3e0c135b78ce25c9919a317905d06d3319b2f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/2271217
Tested-by: Kyle Shimabukuro <kyleshima@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
Commit-Queue: Kyle Shimabukuro <kyleshima@chromium.org>
diff --git a/client/cros/update_engine/nebraska_wrapper.py b/client/cros/update_engine/nebraska_wrapper.py
index 284f6e3..f4a9b60 100644
--- a/client/cros/update_engine/nebraska_wrapper.py
+++ b/client/cros/update_engine/nebraska_wrapper.py
@@ -59,13 +59,13 @@
         self._install_metadata_dir = None
         self._install_payloads_address = None
 
-        # Normalize payload_url to be a list.
-        if isinstance(payload_url, str):
-            payload_url = [payload_url]
-
         # Create a temporary directory for the metadata and download the
         # metadata files.
         if payload_url:
+            # Normalize payload_url to be a list.
+            if not isinstance(payload_url, list):
+                payload_url = [payload_url]
+
             self._update_metadata_dir = autotemp.tempdir()
             self._update_payloads_address = ''.join(
                 payload_url[0].rpartition('/')[0:2])