comparison tincan.py @ 56:f177756200be draft

Add standard config parameters.
author David Barts <n5jrn@me.com>
date Fri, 31 May 2019 18:52:55 -0700
parents 8e72dd62cc6a
children 935f8013f540
comparison
equal deleted inserted replaced
55:8e72dd62cc6a 56:f177756200be
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) 855 config = self.app.config
856 self.app.config['tincan.urlroot'] = self.urlroot 856 config['tincan.fsroot'] = os.path.abspath(self.fsroot)
857 config['tincan.urlroot'] = self.urlroot
858 config['tincan.logger'] = self.logger
859 config['tincan.encoding'] = self.encoding
857 self._launch([]) 860 self._launch([])
858 return self 861 return self
859 862
860 def _launch(self, subdir): 863 def _launch(self, subdir):
861 for entry in os.listdir(os.path.join(self.fsroot, *subdir)): 864 for entry in os.listdir(os.path.join(self.fsroot, *subdir)):