Minor CF refactoring; enhance error logging for SSL cert errors
diff --git a/localstack/services/cloudformation/cloudformation_starter.py b/localstack/services/cloudformation/cloudformation_starter.py
index c4f8bfbbb21a9..cdadc7312c167 100644
--- a/localstack/services/cloudformation/cloudformation_starter.py
+++ b/localstack/services/cloudformation/cloudformation_starter.py
@@ -174,6 +174,14 @@ def update_physical_resource_id(resource):
             LOG.warning('Unable to determine physical_resource_id for resource %s' % type(resource))
 
 
+def update_resource_name(resource, resource_json):
+    """ Some resources require minor fixes in their CF resource definition
+        before we can pass them on to deployment. """
+    props = resource_json['Properties'] = resource_json.get('Properties') or {}
+    if isinstance(resource, sfn_models.StateMachine) and not props.get('StateMachineName'):
+        props['StateMachineName'] = resource.name
+
+
 def apply_patches():
     """ Apply patches to make LocalStack seamlessly interact with the moto backend.
         TODO: Eventually, these patches should be contributed to the upstream repo! """
@@ -354,13 +362,6 @@ def find_id(resource):
 
         return resource
 
-    def update_resource_name(resource, resource_json):
-        """ Some resources require minor fixes in their CF resource definition
-            before we can pass them on to deployment. """
-        props = resource_json['Properties'] = resource_json.get('Properties') or {}
-        if isinstance(resource, sfn_models.StateMachine) and not props.get('StateMachineName'):
-            props['StateMachineName'] = resource.name
-
     def update_resource_id(resource, new_id, props, region_name, stack_name, resource_map):
         """ Update and fix the ID(s) of the given resource. """
 
diff --git a/localstack/utils/server/http2_server.py b/localstack/utils/server/http2_server.py
index 988ffe12299d6..60343a42b4555 100644
--- a/localstack/utils/server/http2_server.py
+++ b/localstack/utils/server/http2_server.py
@@ -1,5 +1,4 @@
 import os
-import ssl
 import asyncio
 import logging
 import traceback
@@ -113,13 +112,14 @@ def run_app_sync(*args, loop=None, shutdown_event=None):
         try:
             try:
                 return loop.run_until_complete(serve(app, config, **run_kwargs))
-            except ssl.SSLError:
-                c_exists = os.path.exists(cert_file_name)
-                k_exists = os.path.exists(key_file_name)
-                c_size = len(load_file(cert_file_name)) if c_exists else 0
-                k_size = len(load_file(key_file_name)) if k_exists else 0
-                LOG.warning('Unable to create SSL context. Cert files exist: %s %s (%sB), %s %s (%sB)' %
-                    (cert_file_name, c_exists, c_size, key_file_name, k_exists, k_size))
+            except Exception as e:
+                if 'SSLError' in str(e):
+                    c_exists = os.path.exists(cert_file_name)
+                    k_exists = os.path.exists(key_file_name)
+                    c_size = len(load_file(cert_file_name)) if c_exists else 0
+                    k_size = len(load_file(key_file_name)) if k_exists else 0
+                    LOG.warning('Unable to create SSL context. Cert files exist: %s %s (%sB), %s %s (%sB)' %
+                        (cert_file_name, c_exists, c_size, key_file_name, k_exists, k_size))
                 raise
         finally:
             try:
diff --git a/requirements.txt b/requirements.txt
index ced77277e46d4..3dae44630ef9f 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -41,7 +41,7 @@ pympler>=0.6
 pyopenssl==17.5.0
 python-coveralls>=2.9.1
 pyyaml>=3.13,<=5.1
-quart>=0.12.0
+Quart>=0.12.0
 requests>=2.20.0               #basic-lib
 requests-aws4auth==0.9
 sasl>=0.2.1

Minor CF refactoring; enhance error logging for SSL cert errors