|
From: <ku...@us...> - 2009-02-26 10:49:32
|
Revision: 331
http://mypyspace.svn.sourceforge.net/mypyspace/?rev=331&view=rev
Author: kurtjx
Date: 2009-02-26 10:49:27 +0000 (Thu, 26 Feb 2009)
Log Message:
-----------
fixed another bug - this one in mpsSong where the except argument causes some problems in line 350 or so - also checking if avas is None in line 180ish
Modified Paths:
--------------
musicGrabber/branches/webserv-branch/myspace2rdf.py
Modified: musicGrabber/branches/webserv-branch/myspace2rdf.py
===================================================================
--- musicGrabber/branches/webserv-branch/myspace2rdf.py 2009-02-25 10:15:29 UTC (rev 330)
+++ musicGrabber/branches/webserv-branch/myspace2rdf.py 2009-02-26 10:49:27 UTC (rev 331)
@@ -177,16 +177,18 @@
#availableAs = song.getAttribute('durl')'''
thisSong = mpsSong(self, song, 'downloadprefix')
thisSong.getUri()
- availableAs = thisSong.uri
+
track = mopy.mo.Track()
track.title.set(thisSong.title)
-
- avas = mopy.mo.MusicalItem(availableAs)
- track.available_as.set(avas)
+ availableAs = thisSong.uri
+ if availableAs:
+ avas = mopy.mo.MusicalItem(availableAs)
+ track.available_as.set(avas)
+ self.mi.add(avas)
#track.available_as.set(mopy.rdfs.Resource(availableAs))
self.subject.made.add(track)
self.mi.add(track)
- self.mi.add(avas)
+
self.createCommonRDF()
self.scrapeGenre()
@@ -346,8 +348,9 @@
try:
self.uri = self.exhaustiveXML.getElementsByTagName('link')[0].firstChild.nodeValue
except AttributeError, err:
- logging.info("mpsUser::getUri ran into a problem finding the download link for a song by artist with uid: " +
- str(self.parent().uid) + " link will be left blank.\n\tError msg: " + str(err))
+ #logging.info("mpsUser::getUri ran into a problem finding the download link for a song by artist with uid: " +
+ # str(self.parent().uid) + " link will be left blank.\n\tError msg: " + str(err))
+ pass
self.uri = ''
def setTrackNum(self, trackNumber, totalTracks):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|