comparison tincan.py @ 55:8e72dd62cc6a draft

Add tincan.fsroot and tincan.urlroot to the app config.
author David Barts <n5jrn@me.com>
date Fri, 31 May 2019 16:50:02 -0700
parents cb5a6e200c95
children f177756200be
comparison
equal deleted inserted replaced
54:cb5a6e200c95 55:8e72dd62cc6a
850 os.mkdir(i) 850 os.mkdir(i)
851 # Add our private lib directory to sys.path 851 # Add our private lib directory to sys.path
852 sys.path.insert(1, os.path.abspath(lib)) 852 sys.path.insert(1, os.path.abspath(lib))
853 # Do what we gotta do 853 # Do what we gotta do
854 self.app = TinCan() 854 self.app = TinCan()
855 self.app.config['tincan.fsroot'] = os.path.abspath(self.fsroot)
856 self.app.config['tincan.urlroot'] = self.urlroot
855 self._launch([]) 857 self._launch([])
856 return self 858 return self
857 859
858 def _launch(self, subdir): 860 def _launch(self, subdir):
859 for entry in os.listdir(os.path.join(self.fsroot, *subdir)): 861 for entry in os.listdir(os.path.join(self.fsroot, *subdir)):