pre-upload: fix repo-name layout.conf check

The code assumed data was one large string buffer rather than an array
of lines.  Fix the check to work with an array.

BUG=chromium:386495
TEST=checked moblab overlay CL

Change-Id: I1f9cf18cc7f9319108dec561952db8ac7f843165
Reviewed-on: https://chromium-review.googlesource.com/219286
Reviewed-by: Steve Fung <stevefung@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/pre-upload.py b/pre-upload.py
index 5393872..17ceb82 100755
--- a/pre-upload.py
+++ b/pre-upload.py
@@ -807,7 +807,10 @@
       errors += ['enable file checking with: use-manifests = true']
 
     # Require repo-name to be set.
-    if 'repo-name = ' not in data:
+    for line in data:
+      if line.startswith('repo-name = '):
+        break
+    else:
       errors += ['set the board name with: repo-name = $BOARD']
 
   # Summarize all the errors we saw (if any).