fromupstream: Print nicer message about SSL errors

At the moment "https://patchwork.linux-mips.org" is giving an error
about an expired SSL certificate.  Error is on the server side as
confirmed by going to that page on a normal web browser.  Rather than
throwing an ugly exception and stopping the script, let's print
something nice.

BUG=None
TEST=Pick a patch w/ a bogus msgid and get no error now.

Change-Id: I5183fdd6fd79f1d7fce8121e9ff4e27d07296681
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/2402079
Tested-by: Douglas Anderson <dianders@chromium.org>
Commit-Queue: Douglas Anderson <dianders@chromium.org>
Commit-Queue: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Auto-Submit: Douglas Anderson <dianders@chromium.org>
diff --git a/contrib/fromupstream.py b/contrib/fromupstream.py
index cab538a..a029ab7 100755
--- a/contrib/fromupstream.py
+++ b/contrib/fromupstream.py
@@ -15,6 +15,7 @@
 import pprint
 import re
 import signal
+import ssl
 import subprocess
 import sys
 import textwrap
@@ -257,7 +258,11 @@
     url = None
     for url in PATCHWORK_URLS:
         rpc = xmlrpc.client.ServerProxy(url + '/xmlrpc/')
-        res = rpc.patch_list({'msgid': msgid})
+        try:
+            res = rpc.patch_list({'msgid': msgid})
+        except ssl.SSLCertVerificationError:
+            errprint('Error: server "%s" gave an SSL error, skipping' % url)
+            continue
         if res:
             patch_id = res[0]['id']
             break