Commits

Anonymous committed 0d4bc09

Ignore all exceptions from PyPI.

Comments (0)

Files changed (1)

     try:
         server = xmlrpclib.Server(PYPI_ADDRESS)
         return server.updated_releases(timestamp)
-    except (xmlrpclib.ProtocolError, socket.error), e:
+    #
+    # Anything can happen on the other side, so catch everything.
+    #   For the record, exceptions experienced so far:
+    #   xmlrpclib.ProtocolError, socket.error, psycopg.OperationalError.
+    except:
         return []
 
 def post_results(name, version, score_data):
             server = xmlrpclib.Server(PYPI_ADDRESS)
             server.post_cheesecake_for_release(name, version, score_data, PYPI_PASSWORD)
             break
-        except (xmlrpclib.ProtocolError, socket.error), e:
+        except xmlrpclib.Fault, e:
+            return False
+        #
+        # Anything can happen on the other side, so catch everything.
+        #   For the record, exceptions experienced so far:
+        #   xmlrpclib.ProtocolError, socket.error, psycopg.OperationalError.
+        except:
             # Wait one minute and try again.
             time.sleep(60)
-        except xmlrpclib.Fault, e:
-            return False
 
     return True