Fix typos in hooke.playlist.FilePlaylist.set_path
authorW. Trevor King <wking@drexel.edu>
Thu, 13 May 2010 11:24:52 +0000 (07:24 -0400)
committerW. Trevor King <wking@drexel.edu>
Thu, 13 May 2010 11:24:52 +0000 (07:24 -0400)
hooke/playlist.py

index 60475ac6bb7ac6777fc06962df3d18f9e9373859..7e76c937a7ab5a0d2e974f6ec3768548b5a0e94c 100644 (file)
@@ -80,10 +80,11 @@ class FilePlaylist (Playlist):
         self._digest = None
 
     def set_path(self, path):
-        if not path.endswith('.hkp'):
-            path += '.hkp'
-        if name == None and path != None:
-            name = os.path.basename(path)
+        if path != None:
+            if not path.endswith('.hkp'):
+                path += '.hkp'
+            if self.name == None:
+                name = os.path.basename(path)
 
     def is_saved(self):
         return self.digest() == self._digest