Substitute the `?' in Mode field with a `-' - stahg-gopher - Static Mercurial page generator for gopher HTML hg clone https://bitbucket.org/iamleot/stahg-gopher DIR Log DIR Files DIR Refs DIR README DIR LICENSE --- DIR changeset b0e68b2aa01068dcfd01406f88021ff8b3d42089 DIR parent fc1c974896ecf24cdf59e20d863bd34f7132decb HTML Author: Leonardo Taccari <iamleot@gmail.com> Date: Mon, 13 May 2019 02:04:21 Substitute the `?' in Mode field with a `-' stat.filemode() could not detect if the mode is associated to a directory or file or something else. However, no directory are listed so we can just ignore the `?' and substitute it with `-'. Diffstat: stahg-gopher.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --- diff -r fc1c974896ec -r b0e68b2aa010 stahg-gopher.py --- a/stahg-gopher.py Mon May 13 01:57:04 2019 +0200 +++ b/stahg-gopher.py Mon May 13 02:04:21 2019 +0200 @@ -212,7 +212,7 @@ for e in self.client.manifest(rev=b'tip'): print('[1|{desc}|{path}|server|port]'.format( desc=gph_escape_entry('{mode:10} {name:68}'.format( - mode=stat.filemode(int(e[1].decode(), base=8)), + mode='-' + stat.filemode(int(e[1].decode(), base=8))[1:], name=e[4].decode())), path=gph_escape_entry('{base_path}/file/{file}.gph'.format( base_path=bp,