Mercurial > cgi-bin > hgweb.cgi > tincan
comparison tincan.py @ 8:9aaa91247b14 draft
Fix minor buglet.
author | David Barts <n5jrn@me.com> |
---|---|
date | Mon, 13 May 2019 16:27:05 -0700 |
parents | 57ec65f527e9 |
children | 75e375b1976a |
comparison
equal
deleted
inserted
replaced
7:57ec65f527e9 | 8:9aaa91247b14 |
---|---|
401 def _gettime(self, path): | 401 def _gettime(self, path): |
402 try: | 402 try: |
403 return os.stat(path).st_mtime | 403 return os.stat(path).st_mtime |
404 except FileNotFoundError: | 404 except FileNotFoundError: |
405 return 0 | 405 return 0 |
406 except OSError as e: | |
407 raise TinCanError("{0}: {1}".format(path, e.strerror)) from e | |
406 | 408 |
407 def _getclass(self): | 409 def _getclass(self): |
408 pypath = os.path.normpath(os.path.join(self._fsroot, *self._splitpath(self._python))) | 410 pypath = os.path.normpath(os.path.join(self._fsroot, *self._splitpath(self._python))) |
409 # Give 'em a default code-behind if they don't furnish one | 411 # Give 'em a default code-behind if they don't furnish one |
410 pytime = self._gettime(pypath) | 412 pytime = self._gettime(pypath) |