Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
PEP8 fixups for discogs scripts.
  • Loading branch information
ianmcorvidae committed Mar 1, 2013
1 parent dda85c7 commit e055cf5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tools/discogs/discogs_parser.py
Expand Up @@ -30,7 +30,7 @@ def startElement(self, name, attrs):
self.string += ">"

# IDs for masters are an attribute of the <master> element
if len(self.tree) == 2 and attrs.has_key("id") and name == "master":
if len(self.tree) == 2 and 'id' in attrs and name == "master":
self.id = attrs.getValue("id")

def endElement(self, name):
Expand Down
4 changes: 2 additions & 2 deletions tools/discogs/discogs_release_parser.py
Expand Up @@ -33,11 +33,11 @@ def startElement(self, name, attrs):
self.string += ">"

# Store release ID
if len(self.tree) == 2 and attrs.has_key("id") and name == "release":
if len(self.tree) == 2 and 'id' in attrs and name == "release":
self.id = attrs.getValue("id")

# Store label IDs
if name == "label" and attrs.has_key("name"):
if name == "label" and 'name' in attrs:
self.labels.append(attrs.getValue("name"))

def endElement(self, name):
Expand Down

0 comments on commit e055cf5

Please sign in to comment.