aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/db
diff options
context:
space:
mode:
Diffstat (limited to 'mediagoblin/db')
-rw-r--r--mediagoblin/db/migration_tools.py4
-rw-r--r--mediagoblin/db/open.py3
2 files changed, 5 insertions, 2 deletions
diff --git a/mediagoblin/db/migration_tools.py b/mediagoblin/db/migration_tools.py
index e39070c3..e725f565 100644
--- a/mediagoblin/db/migration_tools.py
+++ b/mediagoblin/db/migration_tools.py
@@ -14,6 +14,8 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+from __future__ import unicode_literals
+
from mediagoblin.tools.common import simple_printer
from sqlalchemy import Table
from sqlalchemy.sql import select
@@ -39,7 +41,7 @@ class MigrationManager(object):
- migration_registry: where we should find all migrations to
run
"""
- self.name = unicode(name)
+ self.name = name
self.models = models
self.foundations = foundations
self.session = session
diff --git a/mediagoblin/db/open.py b/mediagoblin/db/open.py
index 4ff0945f..9cf9e578 100644
--- a/mediagoblin/db/open.py
+++ b/mediagoblin/db/open.py
@@ -20,6 +20,7 @@ import logging
from mediagoblin.db.base import Base, Session
from mediagoblin import mg_globals
+from mediagoblin._compat import iteritems
_log = logging.getLogger(__name__)
@@ -28,7 +29,7 @@ class DatabaseMaster(object):
def __init__(self, engine):
self.engine = engine
- for k, v in Base._decl_class_registry.iteritems():
+ for k, v in iteritems(Base._decl_class_registry):
setattr(self, k, v)
def commit(self):