]> code.delx.au - notipod/blobdiff - libnotipod.py
Don't need this anymore, it's been set in the XIB
[notipod] / libnotipod.py
index 7f1a6b0c31a15b46230d2e4d9baae62b41ff9626..76b7fb002a361cddd5fa27134c9d69c30c4ca15d 100644 (file)
@@ -44,6 +44,8 @@ class ITunesLibrary(NSObject):
                filename = os.path.expanduser(filename)
                yield "Reading library..."
                plist = read_plist(os.path.expanduser(filename))
+               if plist is None:
+                       raise Exception("Could not find music library: " + filename)
                self.folder = self.loc2name(plist["Music Folder"])
                pl_tracks = plist["Tracks"]
                pl_lookup = {}
@@ -197,8 +199,6 @@ def sync(dry_run, source, dest, files_to_copy):
                filemap[sf.encoded_filename.lower()] = sf
        files_to_copy = set(filemap)
 
-       if not os.path.isdir(dest):
-               raise OSError("No such file or directory: '%s'" % dest)
        for dirpath, dirnames, filenames in os.walk(dest):
                full_dirpath = dirpath
                dirpath = strip_prefix(dirpath, dest)