[gtk-doc] scanobj: only delete the extra file if exists



commit ce302009629ab5093e2d4c63ec7889d092260995
Author: Stefan Sauer <ensonic users sf net>
Date:   Tue Jun 27 07:55:33 2017 +0200

    scanobj: only delete the extra file if exists

 gtkdoc/scangobj.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtkdoc/scangobj.py b/gtkdoc/scangobj.py
index 04f9ec2..e6db6cd 100644
--- a/gtkdoc/scangobj.py
+++ b/gtkdoc/scangobj.py
@@ -1279,7 +1279,9 @@ def run(options):
         os.unlink(o_file)
         os.unlink(x_file)
         if 'libtool' in options.cc:
-            os.unlink(options.module + '-scan.o')
+            o_file = options.module + '-scan.o'
+            if os.path.exists(o_file):
+                os.unlink(o_file)
     else:
         logging.debug('Keeping generated sources for analysis: %s, %s, %s',
                       c_file, o_file, x_file)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]