Some more pylint fixes in different Melange modules.
--- a/app/soc/logic/models/user.py Wed May 27 01:47:38 2009 +0200
+++ b/app/soc/logic/models/user.py Wed May 27 02:09:38 2009 +0200
@@ -143,6 +143,7 @@
# default user to the current logged in user
user = self.getForAccount(account)
+ # pylint: disable-msg=E1103
if user and user.is_developer:
return True
--- a/app/soc/models/seed_db.py Wed May 27 01:47:38 2009 +0200
+++ b/app/soc/models/seed_db.py Wed May 27 02:09:38 2009 +0200
@@ -500,7 +500,7 @@
site.home = home_document
site.put()
-
+ # pylint: disable-msg=E1101
memcache.flush_all()
return http.HttpResponse('Done')
@@ -601,7 +601,8 @@
if not org:
raise Error('Run seed_many for at least %d orgs first.' % i)
-
+
+ # pylint: disable-msg=E1103
properties = {
'key_name': 'google/gsoc2009/org_%d/mentor' % i,
'link_id': 'mentor',
@@ -693,7 +694,8 @@
raise Error('Run seed_many for at least %d mentors first.' % i)
all_properties = []
-
+
+ # pylint: disable-msg=E1103
for i in range(random.randint(5, 20)):
link_id = 'proposal_%s_%d' % (org.link_id, i)
scope_path = 'google/gsoc2009/' + user.link_id
@@ -898,7 +900,7 @@
entity.delete()
except db.Timeout:
return http.HttpResponseRedirect('#')
-
+ # pylint: disable-msg=E1101
memcache.flush_all()
return http.HttpResponse('Done')
--- a/app/soc/views/helper/access.py Wed May 27 01:47:38 2009 +0200
+++ b/app/soc/views/helper/access.py Wed May 27 02:09:38 2009 +0200
@@ -297,6 +297,7 @@
retention = 30
memcache_key = self.key(checker_name)
+ # pylint: disable-msg=E1101
memcache.add(memcache_key, value, retention)
def get(self, checker_name):
@@ -304,6 +305,7 @@
"""
memcache_key = self.key(checker_name)
+ # pylint: disable-msg=E1101
return memcache.get(memcache_key)
def doCheck(self, checker_name, django_args, args):
@@ -870,7 +872,7 @@
}
entity = request_logic.getForFields(fields, unique=True)
-
+ # pylint: disable-msg=E1103
if entity and (entity.scope.status not in ['invalid', 'inactive']):
return
--- a/app/soc/views/models/notification.py Wed May 27 01:47:38 2009 +0200
+++ b/app/soc/views/models/notification.py Wed May 27 02:09:38 2009 +0200
@@ -190,6 +190,7 @@
user = user_logic.getForCurrentAccount()
# if the message is meant for the user that is reading it
+ # pylint: disable-msg=E1103
if entity.scope.key() == user.key():
# mark the entity as read
self._logic.updateEntityProperties(entity, {'unread' : False} )
--- a/app/soc/views/models/program.py Wed May 27 01:47:38 2009 +0200
+++ b/app/soc/views/models/program.py Wed May 27 02:09:38 2009 +0200
@@ -494,6 +494,7 @@
if duplicates:
# we have stored information
+ # pylint: disable-msg=E1103
context['duplicate_cache_content'] = duplicates.json_representation
context['date_of_calculation'] = duplicates.calculated_on
else:
@@ -555,6 +556,7 @@
org_admin = org_admin_logic.logic.getForFields(fields, unique=True)
if org_admin:
+ # pylint: disable-msg=E1103
org_data['admin_name'] = org_admin.name()
org_data['admin_email'] = org_admin.email
--- a/app/soc/views/models/request.py Wed May 27 01:47:38 2009 +0200
+++ b/app/soc/views/models/request.py Wed May 27 02:09:38 2009 +0200
@@ -198,6 +198,7 @@
# construct the Unhandled Invites list
# only select the Invites for this user that haven't been handled yet
+ # pylint: disable-msg=E1103
filter = {'link_id': user_entity.link_id,
'status': 'group_accepted'}
--- a/app/soc/views/models/role.py Wed May 27 01:47:38 2009 +0200
+++ b/app/soc/views/models/role.py Wed May 27 02:09:38 2009 +0200
@@ -496,6 +496,7 @@
# set right fields for the request form
user_entity = user_logic.logic.getForCurrentAccount()
+ # pylint: disable-msg=E1103
fields = {'link_id' : user_entity.link_id,
'role' : params['module_name'],
'group_id' : kwargs['scope_path']}
@@ -537,6 +538,7 @@
# defensively set the fields we need for this request and set status to new
user_entity = user_logic.logic.getForCurrentAccount()
+ # pylint: disable-msg=E1103
request_fields = {'link_id' : user_entity.link_id,
'scope' : group,
'scope_path' : request_scope_path,
@@ -588,6 +590,7 @@
'role': params['module_name']}
request_entity = request_logic.logic.getForFields(fields, unique=True)
+ # pylint: disable-msg=E1103
user_entity = user_logic.logic.getFromKeyNameOr404(request_entity.link_id)
get_dict = request.GET