[oe-commits] [bitbake] 12/20: toaster: orm models Project class Fix pyflake errors
git at git.openembedded.org
git at git.openembedded.org
Wed Nov 30 15:49:53 UTC 2016
rpurdie pushed a commit to branch master
in repository bitbake.
commit 69f33397083f54f977fa0cd4dd621731f32fd034
Author: Michael Wood <michael.g.wood at intel.com>
AuthorDate: Thu Nov 24 11:20:01 2016 +0000
toaster: orm models Project class Fix pyflake errors
Signed-off-by: Michael Wood <michael.g.wood at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/toaster/orm/models.py | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/lib/toaster/orm/models.py b/lib/toaster/orm/models.py
index fd15fbe..394c886 100644
--- a/lib/toaster/orm/models.py
+++ b/lib/toaster/orm/models.py
@@ -38,6 +38,7 @@ import re
import itertools
from signal import SIGUSR1
+
import logging
logger = logging.getLogger("toaster")
@@ -178,24 +179,27 @@ class ProjectManager(models.Manager):
else:
return projects[0]
+
class Project(models.Model):
- search_allowed_fields = ['name', 'short_description', 'release__name', 'release__branch_name']
+ search_allowed_fields = ['name', 'short_description', 'release__name',
+ 'release__branch_name']
name = models.CharField(max_length=100)
short_description = models.CharField(max_length=50, blank=True)
bitbake_version = models.ForeignKey('BitbakeVersion', null=True)
- release = models.ForeignKey("Release", null=True)
- created = models.DateTimeField(auto_now_add = True)
- updated = models.DateTimeField(auto_now = True)
+ release = models.ForeignKey("Release", null=True)
+ created = models.DateTimeField(auto_now_add=True)
+ updated = models.DateTimeField(auto_now=True)
# This is a horrible hack; since Toaster has no "User" model available when
# running in interactive mode, we can't reference the field here directly
- # Instead, we keep a possible null reference to the User id, as not to force
+ # Instead, we keep a possible null reference to the User id,
+ # as not to force
# hard links to possibly missing models
- user_id = models.IntegerField(null = True)
- objects = ProjectManager()
+ user_id = models.IntegerField(null=True)
+ objects = ProjectManager()
# set to True for the project which is the default container
# for builds initiated by the command line etc.
- is_default = models.BooleanField(default = False)
+ is_default= models.BooleanField(default=False)
def __unicode__(self):
return "%s (Release %s, BBV %s)" % (self.name, self.release, self.bitbake_version)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list