Improve PEP8 globals.py

This commit is contained in:
Hardirc
2015-03-06 21:54:41 -05:00
parent 8f6d2342ac
commit bf7bb17f8d
+3 -3
View File
@@ -211,7 +211,7 @@ class Request(Storage):
env = self.env env = self.env
post_vars = self._post_vars = Storage() post_vars = self._post_vars = Storage()
body = self.body body = self.body
#if content-type is application/json, we must read the body # if content-type is application/json, we must read the body
is_json = env.get('content_type', '')[:16] == 'application/json' is_json = env.get('content_type', '')[:16] == 'application/json'
if is_json: if is_json:
@@ -438,7 +438,7 @@ class Response(Storage):
def include_meta(self): def include_meta(self):
s = "\n"; s = "\n";
for meta in (self.meta or {}).iteritems(): for meta in (self.meta or {}).iteritems():
k,v = meta k, v = meta
if isinstance(v,dict): if isinstance(v,dict):
s = s+'<meta'+''.join(' %s="%s"' % (xmlescape(key), xmlescape(v[key])) for key in v) +' />\n' s = s+'<meta'+''.join(' %s="%s"' % (xmlescape(key), xmlescape(v[key])) for key in v) +' />\n'
else: else:
@@ -881,7 +881,7 @@ class Session(Storage):
table_migrate = False table_migrate = False
tname = tablename + '_' + masterapp tname = tablename + '_' + masterapp
table = db.get(tname, None) table = db.get(tname, None)
#Field = db.Field # Field = db.Field
if table is None: if table is None:
db.define_table( db.define_table(
tname, tname,