# HG changeset patch
# User David Barts <n5jrn@me.com>
# Date 1559173893 25200
# Node ID 8948020c54fd6f8f20c9aa15e66652b83170e7f4
# Parent  9335865ae0bb97d657a05a5cd2361dde1e8fd4e1
Remove some debug deadwood, ignore hidden files.

diff -r 9335865ae0bb -r 8948020c54fd tincan.py
--- a/tincan.py	Wed May 29 09:47:27 2019 -0700
+++ b/tincan.py	Wed May 29 16:51:33 2019 -0700
@@ -430,13 +430,10 @@
                 mtime = os.fstat(fp.fileno()).st_mtime
                 bytes = fp.read()
         except FileNotFoundError as e:
-            print(e)  # debug
             return bottle.HTTPError(status=404, exception=e)
         except PermissionError as e:
-            print(e)  # debug
             return bottle.HTTPError(status=403, exception=e)
         except OSError as e:
-            print(e)  # debug
             return bottle.HTTPError(status=500, exception=e)
         # Establish preliminary standard headers.
         headers = {
@@ -811,6 +808,8 @@
 
     def _launch(self, subdir):
         for entry in os.listdir(os.path.join(self.fsroot, *subdir)):
+            if entry.startswith("."):
+                continue  # hidden file
             if not subdir and entry in _BANNED:
                 continue
             etype = os.stat(os.path.join(self.fsroot, *subdir, entry)).st_mode