diff --git a/pylast/__init__.py b/pylast/__init__.py index fc49fbc..de89377 100644 --- a/pylast/__init__.py +++ b/pylast/__init__.py @@ -2288,8 +2288,8 @@ class User(_BaseObject, _Chartable): doc = self._request(self.ws_prefix + ".getInfo", True) - return doc.getElementsByTagName( - "registered")[0].getAttribute("unixtime") + return int(doc.getElementsByTagName( + "registered")[0].getAttribute("unixtime")) def get_tagged_albums(self, tag, limit=None, cacheable=True): """Returns the albums tagged by a user.""" diff --git a/tests/test_pylast_user.py b/tests/test_pylast_user.py index 1169f41..40be3b8 100755 --- a/tests/test_pylast_user.py +++ b/tests/test_pylast_user.py @@ -87,7 +87,7 @@ class TestPyLastUser(PyLastTestCase): # Assert # Just check date because of timezones - self.assertEqual(unixtime_registered, u"1037793040") + self.assertEqual(unixtime_registered, 1037793040) def test_get_countryless_user(self): # Arrange