]> code.delx.au - notipod/commitdiff
Whitespace
authorJames Bunton <jamesbunton@fastmail.fm>
Sun, 2 Jan 2011 18:37:25 +0000 (05:37 +1100)
committerJames Bunton <jamesbunton@fastmail.fm>
Sun, 2 Jan 2011 18:37:25 +0000 (05:37 +1100)
libnotipod.py
notipod_gui.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)
 
 
index 084b1d75482050c82e0866b3b396f2e03fe1d13d..9b299ea74bb40f52037616775feb9bdee44ea847 100644 (file)
@@ -149,7 +149,7 @@ class NotiPodController(NSObject):
                        self.stopGenerator, finish, True)
                self.runningGenerator = False
                del pool
-       
+
        def stopGenerator(self, finish):
                self.runningGenerator = False
                NSApp.endSheet_(self.loadingSheet)