[Git][NTPsec/ntpsec][master] Change os.path.isfile() to lexists(). Maybe a link exists.
Gary E. Miller
gitlab at mg.gitlab.com
Sat Sep 10 03:28:13 UTC 2016
Gary E. Miller pushed to branch master at NTPsec / ntpsec
Commits:
b5e593d0 by Gary E. Miller at 2016-09-09T20:26:09-07:00
Change os.path.isfile() to lexists(). Maybe a link exists.
If the path points to a link, not a file, ntpviz tried to overwrite
the link, and failed with error.
- - - - -
1 changed file:
- ntpstats/ntpviz
Changes:
=====================================
ntpstats/ntpviz
=====================================
--- a/ntpstats/ntpviz
+++ b/ntpstats/ntpviz
@@ -782,13 +782,13 @@ if __name__ == '__main__':
# if no ntpsec favicon.ico, write one.
ico_filename = os.path.join(outdir, "favicon.ico")
- if not os.path.isfile( ico_filename ):
+ if not os.path.lexists( ico_filename ):
with open( ico_filename, "w" ) as wp:
wp.write(binascii.a2b_base64(ntpsec_ico))
# if no ntpsec logo, write one.
logo_filename = os.path.join(outdir, "ntpsec-logo.png")
- if not os.path.isfile( logo_filename ):
+ if not os.path.lexists( logo_filename ):
with open( logo_filename, "w" ) as wp:
wp.write(binascii.a2b_base64(ntpsec_logo))
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/b5e593d0632f3bb70f1d24b9417dd7ae4a87a259
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160910/df2bb881/attachment.html>
More information about the vc
mailing list