From f6a700e8ae15f9b3368b908bded8129eb9345d7f Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Fri, 7 Mar 2014 15:19:23 +0200 Subject: [PATCH] Fix some compat issues in mediagoblin/db/models.py. --- mediagoblin/db/models.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py index b750375d..79389002 100644 --- a/mediagoblin/db/models.py +++ b/mediagoblin/db/models.py @@ -18,6 +18,8 @@ TODO: indexes on foreignkeys, where useful. """ +from __future__ import print_function + import logging import datetime @@ -371,7 +373,7 @@ class MediaEntry(Base, MediaEntryMixin): # Delete all related files/attachments try: delete_media_files(self) - except OSError, error: + except OSError as error: # Returns list of files we failed to delete _log.error('No such files from the user "{1}" to delete: ' '{0}'.format(str(error), self.get_uploader)) @@ -943,7 +945,7 @@ def show_table_init(engine_uri): if __name__ == '__main__': from sys import argv - print repr(argv) + print(repr(argv)) if len(argv) == 2: uri = argv[1] else: -- 2.25.1