buildbot_test_toolchains: fix several errors

This fixes some errors introduced by previous patch.

BUG=none
TEST=the script is running fine on chrotomation2

Change-Id: Id6b49941aef5f5c8902dae9dfeefe2acc51ef310
Reviewed-on: https://chrome-internal-review.googlesource.com/227840
Reviewed-by: Caroline Tice <cmtice@google.com>
Commit-Queue: Yunlian Jiang <yunlian@google.com>
Tested-by: Yunlian Jiang <yunlian@google.com>
diff --git a/buildbot_test_toolchains.py b/buildbot_test_toolchains.py
index 2c203ce..a54fa0f 100755
--- a/buildbot_test_toolchains.py
+++ b/buildbot_test_toolchains.py
@@ -206,7 +206,8 @@
     crosperf, and copy images into seven-day report directories.
     """
     date_str = datetime.date.today()
-    description = "master_%s_%s_%s" % ('_'.join(USE_NEXT_GCC_PATCH),
+    patch_string = '_'.join(str(p) for p in USE_NEXT_GCC_PATCH)
+    description = "master_%s_%s_%s" % (patch_string,
                                        self._build,
                                        date_str)
     trybot_image = buildbot_utils.GetTrybotImage(self._chromeos_root,
@@ -270,8 +271,9 @@
     print "Please specify the ChromeOS root directory."
     return 1
 
-  if options.patch:
-    global USE_NEXT_GCC_PATCH = options.patch.split(',')
+  if options.patches:
+    global USE_NEXT_GCC_PATCH
+    USE_NEXT_GCC_PATCH = options.patch.split(',')
 
   fc = ToolchainComparator(options.board, options.remote,
                            options.chromeos_root, options.weekday)