Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
earonesty committed Nov 22, 2019
1 parent 1aa11bb commit 2e0e939
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions smx/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,16 @@ def __init__(self, root=None, init=None):
self.__detect = {".html", ".htm"}
self.__expand = {".htx", ".smx"}

self.root = os.path.abspath(root)
self.root = root
self.ctx = Smx()
if init:
fp = os.path.join(self.root, init)
with open(fp) as f:
self.ctx.expand_io(f, Writer())

self._init = False
if root:
self.root = os.path.abspath(root)
if init:
fp = os.path.join(self.root, init)
with open(fp) as f:
self.ctx.expand_io(f, Writer())

self._init = False

@memoize
def is_script(self, path):
Expand Down

0 comments on commit 2e0e939

Please sign in to comment.