Only run on py3.7

This commit is contained in:
Erik Johnston 2020-02-19 13:49:15 +00:00
parent c7bc2a7a64
commit e377e08d5a

View file

@ -282,9 +282,12 @@ def start(hs, listeners=None):
# We now freeze all allocated objects in the hopes that (almost) # We now freeze all allocated objects in the hopes that (almost)
# everything currently allocated are things that will be used for the # everything currently allocated are things that will be used for the
# rest of time. Doing so means less work each GC (hopefully) # rest of time. Doing so means less work each GC (hopefully).
gc.collect() #
gc.freeze() # This only works on Python 3.7
if sys.version_info >= (3, 7):
gc.collect()
gc.freeze()
except Exception: except Exception:
traceback.print_exc(file=sys.stderr) traceback.print_exc(file=sys.stderr)
reactor = hs.get_reactor() reactor = hs.get_reactor()