Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/manatlan/htagweb
Browse files Browse the repository at this point in the history
  • Loading branch information
manatlan committed Jul 18, 2023
2 parents 5b83fec + 5e228fa commit c085c78
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions htagweb/uidprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# https://github.com/manatlan/htag
# #############################################################################
import asyncio
import asyncio,sys
import multiprocessing
import logging,importlib
from htag.render import HRenderer
Expand Down Expand Up @@ -38,8 +38,16 @@ async def ht_create(self, fqn,js,init_params=None,renew=False): # -> str
#--------------------------- fqn -> module, name
names = fqn.split(".")
modulename,name=".".join(names[:-1]), names[-1]
module=importlib.import_module(modulename)
module=importlib.reload(module)
if modulename in sys.modules:
module=sys.modules[modulename]
try:
module=importlib.reload( module )
except ModuleNotFoundError:
""" can't be (really) reloaded if the component is in the
same module as the instance htag server"""
pass
else:
module=importlib.import_module(modulename)
#---------------------------
htClass = getattr(module,name)

Expand Down

0 comments on commit c085c78

Please sign in to comment.