fixed some pep8 stuff
This commit is contained in:
@@ -264,3 +264,4 @@ if __name__=='__main__':
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -244,3 +244,4 @@ if __name__=='__main__':
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,3 +6,4 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -502,3 +502,4 @@ aes_Rcon = array('B',
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -205,3 +205,4 @@ if __name__=="__main__":
|
||||
print test()
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3911,3 +3911,4 @@ def parse(url_file_stream_or_string, etag=None, modified=None, agent=None, refer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ class MemcacheClient(object):
|
||||
key,
|
||||
f,
|
||||
time_expire=300,
|
||||
):
|
||||
):
|
||||
key = '%s/%s' % (self.request.application, key)
|
||||
dt = time_expire
|
||||
value = None
|
||||
@@ -44,7 +44,7 @@ class MemcacheClient(object):
|
||||
obj = self.client.get(key)
|
||||
if obj:
|
||||
value = obj[1] + value
|
||||
self.client.set(key, (time.time(), value))
|
||||
self.client.set(key, (time.time(), value))
|
||||
return value
|
||||
|
||||
def clear(self, key = None):
|
||||
@@ -65,3 +65,4 @@ class MemcacheClient(object):
|
||||
|
||||
def flush_all(self,*a,**b):
|
||||
return self.client.delete(*a,**b)
|
||||
|
||||
|
||||
@@ -91,3 +91,4 @@ def autoretry_datastore_timeouts(attempts=5.0, interval=0.1, exponent=2.0):
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -68,3 +68,4 @@ def pdf_from_html(html):
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -20,3 +20,4 @@ def button(merchant_id="123456789012345",
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -10,3 +10,4 @@ from gluon.dal import DAL, Field, Table, Query, Set, Expression, Row, Rows, driv
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -59,3 +59,4 @@ def THUMB(image, nx=120, ny=120, gae=False, name='thumb'):
|
||||
return image
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -912,3 +912,4 @@ if __name__ == '__main__':
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -128,3 +128,4 @@ if __name__ == "__main__":
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -130,3 +130,4 @@ if __name__ == '__main__':
|
||||
test()
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -172,3 +172,4 @@ if __name__ == '__main__':
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -10,3 +10,4 @@ from fpdf import *
|
||||
# import warnings
|
||||
# warnings.warn("pyfpdf package name is deprecated, please use fpdf instead")
|
||||
|
||||
|
||||
|
||||
@@ -965,3 +965,4 @@ if __name__ == '__main__':
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -168,3 +168,4 @@ class RedisClient(object):
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ class MockTable(object):
|
||||
|
||||
class MockQuery(object):
|
||||
"""a fake Query object that supports querying by id
|
||||
and listing all keys. No other operation is supported
|
||||
and listing all keys. No other operation is supported
|
||||
"""
|
||||
def __init__(self, field=None, db=None, prefix=None, session_expiry=False):
|
||||
self.field = field
|
||||
@@ -187,15 +187,15 @@ class MockQuery(object):
|
||||
|
||||
class RecordDeleter(object):
|
||||
"""Dumb record deleter to support sessions2trash.py"""
|
||||
|
||||
|
||||
def __init__(self, db, key, keyprefix):
|
||||
self.db, self.key, self.keyprefix = db, key, keyprefix
|
||||
|
||||
|
||||
def __call__(self):
|
||||
id_idx = "%s:id_idx" % self.keyprefix
|
||||
#remove from the index
|
||||
self.db.srem(id_idx, self.key)
|
||||
#remove the key itself
|
||||
self.db.delete(self.key)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -593,3 +593,4 @@ if __name__ == '__main__':
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -271,3 +271,4 @@ if __name__=='__main__':
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -152,3 +152,4 @@ if __name__ == "__main__":
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -117,3 +117,4 @@ def sms_email(number,provider):
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -880,3 +880,4 @@ if __name__ == '__main__':
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -67,3 +67,4 @@ if __name__=='__main__':
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -248,3 +248,4 @@ class TaskBarIcon:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -96,3 +96,4 @@ if __name__=='__main__':
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -521,3 +521,4 @@ class mobilize(object):
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ mostly for testing purposes
|
||||
|
||||
- customizable
|
||||
- supports basic auth
|
||||
- supports cookies
|
||||
- supports cookies
|
||||
- supports session cookies (tested with web2py sessions)
|
||||
- detects broken session
|
||||
- detects web2py form postbacks and handles formname and formkey
|
||||
@@ -51,7 +51,7 @@ class WebClient(object):
|
||||
|
||||
def post(self,url,data=None,cookies=None,headers=None,auth=None):
|
||||
self.url = self.app+url
|
||||
|
||||
|
||||
# if this POST form requires a postback do it
|
||||
if data and '_formname' in data and self.postbacks and \
|
||||
self.history and self.history[-1][1]!=self.url:
|
||||
@@ -202,3 +202,4 @@ if __name__ == '__main__':
|
||||
test_web2py_registration_and_login()
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -195,3 +195,4 @@ if __name__ == "__main__":
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user