Commit 596cb9c7 authored by Claude Paroz's avatar Claude Paroz
Browse files

Replaced print statement by print function (forward compatibility syntax).

parent fe43ad57
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ def gather_stats(p):
            prof = stats.load(os.path.join(p, f))
        else:
            continue
        print "Processing %s" % f
        print("Processing %s" % f)
        if path in profiles:
            profiles[path].add(prof)
        else:
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ def unique_messages():
    elif os.path.isdir('locale'):
        basedir = os.path.abspath('locale')
    else:
        print "This script should be run from the Django Git tree or your project or app tree."
        print("This script should be run from the Django Git tree or your project or app tree.")
        sys.exit(1)

    for (dirpath, dirnames, filenames) in os.walk(basedir):
+1 −1
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ def create_permissions(app, created_models, verbosity, **kwargs):
    auth_app.Permission.objects.bulk_create(objs)
    if verbosity >= 2:
        for obj in objs:
            print "Adding permission '%s'" % obj
            print("Adding permission '%s'" % obj)


def create_superuser(app, created_models, verbosity, db, **kwargs):
+3 −3
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ def update_contenttypes(app, created_models, verbosity=2, **kwargs):
    ])
    if verbosity >= 2:
        for ct in cts:
            print "Adding content type '%s | %s'" % (ct.app_label, ct.model)
            print("Adding content type '%s | %s'" % (ct.app_label, ct.model))

    # Confirm that the content type is stale before deletion.
    if to_remove:
@@ -63,11 +63,11 @@ If you're unsure, answer 'no'.
        if ok_to_delete == 'yes':
            for ct in to_remove:
                if verbosity >= 2:
                    print "Deleting stale content type '%s | %s'" % (ct.app_label, ct.model)
                    print("Deleting stale content type '%s | %s'" % (ct.app_label, ct.model))
                ct.delete()
        else:
            if verbosity >= 2:
                print "Stale content types remain."
                print("Stale content types remain.")

def update_all_contenttypes(verbosity=2, **kwargs):
    for app in get_apps():
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ class SpatiaLiteCreation(DatabaseCreation):
            test_db_repr = ''
            if verbosity >= 2:
                test_db_repr = " ('%s')" % test_database_name
            print "Creating test database for alias '%s'%s..." % (self.connection.alias, test_db_repr)
            print("Creating test database for alias '%s'%s..." % (self.connection.alias, test_db_repr))

        self._create_test_db(verbosity, autoclobber)

Loading