adibaewa / pylast

Automatically exported from code.google.com/p/pylast
Apache License 2.0
0 stars 0 forks source link

_remove_tag is broken #57

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
_remove tag is broken, as it breaks when the 'tag' argument is not an instance 
of a Tag object, but a simple string. (I think the Tag class is 
overengineering, TBH, since all it ever does is look up or set the string value 
anyway.) I believe the below fixes this issue:

    def _remove_tag(self, tag):
        """Remove a user's tag from this object."""

        if isinstance(tag, Tag):
            tag = tag.get_name()

        params = self._get_params()
        params['tag'] = _unicode(tag)

        self._request(self.ws_prefix + '.removeTag', False, params)

Original issue reported on code.google.com by thisfred@gmail.com on 18 Jan 2011 at 4:51

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r243.

Original comment by amr.hassan on 21 Jan 2011 at 10:28