]> code.delx.au - mediapc-tools/commitdiff
mythsymlink: print helpful error if symlink fails
authorJames Bunton <jamesbunton@delx.net.au>
Sun, 31 Jul 2016 04:48:11 +0000 (14:48 +1000)
committerJames Bunton <jamesbunton@delx.net.au>
Sun, 31 Jul 2016 04:48:11 +0000 (14:48 +1000)
mythsymlink

index a8391ac8a2b76b3cb6f10c248e09f4065d5e854f..c74421093de8eabb4c22fde8e276d0d3fbc7cf04 100755 (executable)
@@ -83,5 +83,8 @@ for row in cursor:
         if not os.path.isdir(dirname):
             os.mkdir(dirname)
 
-    os.symlink(source, dest)
-
+    try:
+        os.symlink(source, dest)
+    except Exception, e:
+        print e, "--", source, "->", dest
+        sys.exit(1)