X-Git-Url: https://git.jsancho.org/?p=mojodb.git;a=blobdiff_plain;f=connection.py;h=32cd8ae1316a3aa8b16927ff002e4d036ed20663;hp=ca67b9e297cf4e1422bee2a8885a05a04d64379e;hb=2c1872fd5004c8464e146081b61783de47b87e2d;hpb=792f961fb96bb8533e540970c54f43b958d77296 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 []