]> code.delx.au - notipod/blobdiff - libnotipod.py
Whitespace
[notipod] / libnotipod.py
index 80f6a0d02ab65695b2410af833b9a24293313c57..49af34a64288ff5056169be1c11875981f75c3da 100644 (file)
@@ -53,7 +53,7 @@ class ITunesLibrary(NSObject):
 
        def loc2name(self, location):
                return urllib.splithost(urllib.splittype(urllib.unquote(location))[1])[1]
-       
+
        def make_playlist(self, pl_playlist, pl_tracks):
                name = pl_playlist["Name"]
                pid = pl_playlist["Playlist Persistent ID"]
@@ -88,7 +88,7 @@ class ITunesLibrary(NSObject):
                for playlist in self.get_playlists():
                        if playlist.name == name:
                                return playlist
-       
+
        def get_playlist_pid(self, pid):
                for playlist in self.get_playlists():
                        if playlist.pid == pid:
@@ -224,10 +224,9 @@ def sync(dry_run, source, dest, files_to_copy):
        for filename in files_to_copy:
                yield "Copy: " + filemap[filename].orig_filename
                if not dry_run:
-                       mkdirhier(os.path.dirname(join(dest, filename)))
-                       shutil.copy2(
-                               join(source, filemap[filename].orig_filename),
-                               join(dest, filemap[filename].encoded_filename)
-                       )
+                       source_file = join(source, filemap[filename].orig_filename)
+                       dest_file = join(dest, filemap[filename].encoded_filename)
+                       mkdirhier(os.path.dirname(dest_file))
+                       shutil.copy2(source_file, dest_file)