Fix some compat issues in mediagoblin/db/models.py.
authorBerker Peksag <berker.peksag@gmail.com>
Fri, 7 Mar 2014 13:19:23 +0000 (15:19 +0200)
committerBerker Peksag <berker.peksag@gmail.com>
Thu, 8 May 2014 17:32:02 +0000 (20:32 +0300)
mediagoblin/db/models.py

index b750375d7b68b12b560c4fcb80dd93686e1d6585..7938900241dc20c147daf73457e423cb1e42963f 100644 (file)
@@ -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: