X-Git-Url: https://git.jsancho.org/?p=mojodb.git;a=blobdiff_plain;f=connection.py;fp=connection.py;h=32cd8ae1316a3aa8b16927ff002e4d036ed20663;hp=ca67b9e297cf4e1422bee2a8885a05a04d64379e;hb=aed397c34f0bcc9eeb12e42256cc47e79e049971;hpb=4a34db8a057d135225e70ede89b767e89f827c8f diff --git a/connection.py b/connection.py index ca67b9e..32cd8ae 100644 --- a/connection.py +++ b/connection.py @@ -39,7 +39,7 @@ class Connection(object): def database_names(self): try: - return [unicode(x) for x in self._get_databases()] + return [str(x) for x in self._get_databases()] except: return [] @@ -48,7 +48,7 @@ class Connection(object): def collection_names(self, db_name): try: - return list(set([unicode(x.split('$')[0]) for x in filter(lambda x: '$' in x, self._get_tables(db_name))])) + return list(set([str(x.split('$')[0]) for x in filter(lambda x: '$' in x, self._get_tables(db_name))])) except: return []