[Git][NTPsec/ntpsec][master] Make sure files exist before removing them

Eric S. Raymond gitlab at mg.gitlab.com
Wed Nov 16 14:51:17 UTC 2016


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
523f3be3 by Matt Selsky at 2016-11-15T10:34:20-05:00
Make sure files exist before removing them

Otherwise exceptions are thrown if you run "waf clean" twice

- - - - -


1 changed file:

- wscript


Changes:

=====================================
wscript
=====================================
--- a/wscript
+++ b/wscript
@@ -141,8 +141,9 @@ def linkmaker(ctx):
                                     pass
                             os.symlink(relpath, path_source.abspath())
             elif ctx.cmd == 'clean':
-                    #print "removing", path_source.abspath()
-                    os.remove(path_source.abspath())
+                    if path_source.exists():
+                        #print "removing", path_source.abspath()
+                        os.remove(path_source.abspath())
     bldnode = ctx.bldnode.abspath()
     os.system("ln -sf %s/libntp/ntpc.so %s/pylib/ntpc.so " % (bldnode, bldnode))
 



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/523f3be3b2e52c564cc3feac6a1c1d43aade072d
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161116/d1f6917c/attachment.html>


More information about the vc mailing list