mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-25 08:58:27 -07:00
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
51 lines
2.1 KiB
Diff
51 lines
2.1 KiB
Diff
From baf971a58d310d6d3bfe7ddea81b33c810e3d3cf Mon Sep 17 00:00:00 2001
|
|
From: Tim Kamanin <tim@timonweb.com>
|
|
Date: Sat, 21 Feb 2015 18:42:45 +0100
|
|
Subject: [PATCH] Added Python 3 support
|
|
|
|
---
|
|
django_baker/bakery.py | 4 ++--
|
|
django_baker/management/commands/bake.py | 3 ++-
|
|
2 files changed, 4 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/django_baker/bakery.py b/django_baker/bakery.py
|
|
index ff04ef3..7c0cbc2 100644
|
|
--- a/django_baker/bakery.py
|
|
+++ b/django_baker/bakery.py
|
|
@@ -4,7 +4,7 @@
|
|
import re
|
|
from django.template.loader import get_template
|
|
from django.template import Context
|
|
-
|
|
+from django.utils.six import iteritems
|
|
|
|
class Baker(object):
|
|
"""
|
|
@@ -16,7 +16,7 @@ def bake(self, apps_and_models):
|
|
"""
|
|
Iterates a dictionary of apps and models and creates all the necessary files to get up and running quickly.
|
|
"""
|
|
- for app_label, models in apps_and_models.iteritems():
|
|
+ for app_label, models in iteritems(apps_and_models):
|
|
model_names = {model.__name__: self.get_field_names_for_model(model) for model in models}
|
|
self.create_directories(app_label)
|
|
self.create_init_files(app_label, model_names.keys(), models)
|
|
diff --git a/django_baker/management/commands/bake.py b/django_baker/management/commands/bake.py
|
|
index e602345..f7dc16a 100644
|
|
--- a/django_baker/management/commands/bake.py
|
|
+++ b/django_baker/management/commands/bake.py
|
|
@@ -1,3 +1,4 @@
|
|
+from __future__ import print_function
|
|
from django.core.management.base import BaseCommand, CommandError
|
|
from django.core.exceptions import ImproperlyConfigured
|
|
from django.db.models import get_app, get_models
|
|
@@ -51,7 +52,7 @@ def get_selected_models(self, app, app_label, model_names):
|
|
"""
|
|
if model_names:
|
|
try:
|
|
- print app_label, model_names
|
|
+ print(app_label, model_names)
|
|
return [get_model(app_label, model_name) for model_name in model_names]
|
|
except:
|
|
raise CommandError("One or more of the models you entered for %s are incorrect." % app_label)
|