]> code.delx.au - mediapc-tools/commitdiff
mythsymlink: Skip missing files
authorJames Bunton <jamesbunton@delx.net.au>
Sun, 16 Feb 2014 11:32:20 +0000 (22:32 +1100)
committerJames Bunton <jamesbunton@delx.net.au>
Sun, 16 Feb 2014 11:32:20 +0000 (22:32 +1100)
mythsymlink

index 7787a723d347feedaff1f3862ce93d91e9e8e587..efccc172dfeacd3ef604d061c9790a8855f24f2a 100755 (executable)
@@ -72,6 +72,9 @@ for row in cursor:
        source = "%s/%s" % (recordingsdir, basename)
        dest = "%s/%s" % (title, filename)
 
+       if not os.path.isfile(source):
+               continue
+
        dirnames = dest.split("/")[:-1]
        for i in xrange(1, len(dirnames)+1):
                dirname = "/".join(dirnames[:i])