Mercurial > cgi-bin > hgweb.cgi > tincan
changeset 52:243603aaab7e draft
Clean up the code a bit.
author | David Barts <n5jrn@me.com> |
---|---|
date | Thu, 30 May 2019 22:19:41 -0700 |
parents | caed7c5e8318 |
children | 3a6180c1feea |
files | install-static |
diffstat | 1 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/install-static Thu May 30 22:02:02 2019 -0700 +++ b/install-static Thu May 30 22:19:41 2019 -0700 @@ -49,14 +49,13 @@ print("cp", repr(spath), repr(tpath)) copyfile(spath, tpath) elif S_ISDIR(stype): - if ttype is not None: - if not S_ISDIR(ttype): - sys.stderr.write( - "{0}: {1!r} not a directory\n".format(MYNAME, tpath)) - sys.exit(1) - else: + if ttype is None: print("mkdir", repr(tpath)) os.mkdir(tpath) + elif not S_ISDIR(ttype): + sys.stderr.write( + "{0}: {1!r} not a directory\n".format(MYNAME, tpath)) + sys.exit(1) copydir(spath, tpath, False) else: sys.stderr.write(