From d552eb2eebc7e78bc602746df193e6c141b0991f Mon Sep 17 00:00:00 2001 From: mdipierro Date: Fri, 19 Oct 2012 09:40:17 -0500 Subject: [PATCH] fixed some pep8 stuff --- VERSION | 2 +- __init__.py | 2 ++ anyserver.py | 1 + appengine_config.py | 1 + applications/admin/controllers/appadmin.py | 1 + applications/admin/controllers/debug.py | 31 ++++++++--------- applications/admin/controllers/default.py | 19 ++++++----- applications/admin/controllers/gae.py | 1 + applications/admin/controllers/mercurial.py | 1 + applications/admin/controllers/openshift.py | 7 ++-- .../admin/controllers/plugin_jqmobile.py | 1 + applications/admin/controllers/shell.py | 1 + applications/admin/controllers/toolbar.py | 1 + applications/admin/controllers/webservices.py | 3 +- applications/admin/controllers/wizard.py | 1 + applications/admin/models/0.py | 5 +-- applications/admin/models/0_imports.py | 1 + applications/admin/models/access.py | 3 +- applications/admin/models/buttons.py | 1 + applications/admin/models/db.py | 1 + applications/admin/models/menu.py | 3 +- .../admin/models/plugin_multiselect.py | 1 + .../examples/controllers/ajax_examples.py | 1 + applications/examples/controllers/appadmin.py | 1 + .../examples/controllers/cache_examples.py | 1 + applications/examples/controllers/default.py | 1 + .../examples/controllers/form_examples.py | 1 + applications/examples/controllers/global.py | 1 + .../examples/controllers/layout_examples.py | 1 + .../examples/controllers/session_examples.py | 1 + .../examples/controllers/simple_examples.py | 1 + .../examples/controllers/spreadsheet.py | 1 + .../examples/controllers/template_examples.py | 1 + applications/examples/models/feeds_reader.py | 1 + applications/examples/models/markmin.py | 1 + applications/examples/models/menu.py | 1 + applications/welcome/controllers/appadmin.py | 1 + applications/welcome/controllers/default.py | 1 + applications/welcome/models/db.py | 3 +- applications/welcome/models/menu.py | 3 +- cgihandler.py | 1 + fcgihandler.py | 1 + gaehandler.py | 1 + gluon/__init__.py | 1 + gluon/admin.py | 1 + gluon/cache.py | 11 ++++--- gluon/cfs.py | 1 + gluon/compileapp.py | 3 +- gluon/contenttype.py | 1 + gluon/contrib/AuthorizeNet.py | 1 + gluon/contrib/DowCommerce.py | 1 + gluon/contrib/__init__.py | 1 + gluon/contrib/aes.py | 1 + gluon/contrib/autolinks.py | 1 + gluon/contrib/feedparser.py | 1 + gluon/contrib/gae_memcache.py | 5 +-- gluon/contrib/gae_retry.py | 1 + gluon/contrib/generics.py | 1 + gluon/contrib/google_wallet.py | 1 + gluon/contrib/gql.py | 1 + gluon/contrib/imageutils.py | 1 + gluon/contrib/memdb.py | 1 + gluon/contrib/pam.py | 1 + gluon/contrib/pbkdf2.py | 1 + gluon/contrib/populate.py | 1 + gluon/contrib/pyfpdf.py | 1 + gluon/contrib/qdb.py | 1 + gluon/contrib/redis_cache.py | 1 + gluon/contrib/redis_session.py | 10 +++--- gluon/contrib/rss2.py | 1 + gluon/contrib/shell.py | 1 + gluon/contrib/simplejsonrpc.py | 1 + gluon/contrib/sms_utils.py | 1 + gluon/contrib/spreadsheet.py | 1 + gluon/contrib/stripe.py | 1 + gluon/contrib/taskbar_widget.py | 1 + gluon/contrib/timecollect.py | 1 + gluon/contrib/user_agent_parser.py | 1 + gluon/contrib/webclient.py | 5 +-- gluon/contrib/websocket_messaging.py | 1 + gluon/custom_import.py | 1 + gluon/dal.py | 17 +++++----- gluon/debug.py | 1 + gluon/decoder.py | 1 + gluon/fileutils.py | 1 + gluon/globals.py | 25 +++++++------- gluon/highlight.py | 1 + gluon/html.py | 3 +- gluon/http.py | 1 + gluon/import_all.py | 1 + gluon/languages.py | 33 ++++++++++--------- gluon/main.py | 13 ++++---- gluon/messageboxhandler.py | 1 + gluon/myregex.py | 1 + gluon/newcron.py | 3 +- gluon/portalocker.py | 5 +-- gluon/reserved_sql_keywords.py | 1 + gluon/restricted.py | 3 +- gluon/rewrite.py | 13 ++++---- gluon/rocket.py | 1 + gluon/sanitizer.py | 1 + gluon/scheduler.py | 9 ++--- gluon/serializers.py | 1 + gluon/settings.py | 1 + gluon/shell.py | 1 + gluon/sql.py | 1 + gluon/sqlhtml.py | 19 ++++++----- gluon/storage.py | 5 +-- gluon/streamer.py | 1 + gluon/template.py | 5 +-- gluon/tools.py | 27 +++++++-------- gluon/utf8.py | 1 + gluon/utils.py | 7 ++-- gluon/validators.py | 3 +- gluon/widget.py | 1 + gluon/winservice.py | 1 + gluon/xmlrpc.py | 1 + isapiwsgihandler.py | 1 + modpythonhandler.py | 1 + options_std.py | 1 + router.example.py | 1 + routes.example.py | 7 ++-- scgihandler.py | 1 + setup.py | 1 + setup_app.py | 1 + setup_exe.py | 1 + web2py.py | 1 + wsgihandler.py | 1 + 128 files changed, 267 insertions(+), 140 deletions(-) diff --git a/VERSION b/VERSION index 53625f35..7a32a07d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.1.1 (2012-10-18 18:20:45) dev +Version 2.1.1 (2012-10-19 09:40:10) dev diff --git a/__init__.py b/__init__.py index 584ba879..1901ba93 100644 --- a/__init__.py +++ b/__init__.py @@ -8,3 +8,5 @@ + + diff --git a/anyserver.py b/anyserver.py index 53985442..0cae0c2f 100644 --- a/anyserver.py +++ b/anyserver.py @@ -310,3 +310,4 @@ if __name__=='__main__': + diff --git a/appengine_config.py b/appengine_config.py index 4bb11668..a736220c 100644 --- a/appengine_config.py +++ b/appengine_config.py @@ -7,3 +7,4 @@ def webapp_add_wsgi_middleware(app): + diff --git a/applications/admin/controllers/appadmin.py b/applications/admin/controllers/appadmin.py index bc8ae060..f00eba91 100644 --- a/applications/admin/controllers/appadmin.py +++ b/applications/admin/controllers/appadmin.py @@ -444,3 +444,4 @@ def ccache(): + diff --git a/applications/admin/controllers/debug.py b/applications/admin/controllers/debug.py index 6cf1b40d..c18faf5c 100644 --- a/applications/admin/controllers/debug.py +++ b/applications/admin/controllers/debug.py @@ -51,7 +51,7 @@ def interact(): lineno = web_debugger.lineno if filename: lines = dict([(i+1, l) for (i, l) in enumerate( - [l.strip("\n").strip("\r") for l + [l.strip("\n").strip("\r") for l in open(filename).readlines()])]) filename = os.path.basename(filename) else: @@ -76,9 +76,9 @@ def interact(): response.flash = T('"User Exception" debug mode. ' 'An error ticket could be issued!') - return dict(app=app, data="", - filename=web_debugger.filename, lines=lines, lineno=lineno, - f_globals=f_globals, f_locals=f_locals, + return dict(app=app, data="", + filename=web_debugger.filename, lines=lines, lineno=lineno, + f_globals=f_globals, f_locals=f_locals, exception=web_debugger.exception_info) def step(): @@ -120,8 +120,8 @@ def breakpoints(): # Get all .py files files = listdir(apath('', r=request), '.*\.py$') - files = [filename for filename in files - if filename and 'languages' not in filename + files = [filename for filename in files + if filename and 'languages' not in filename and not filename.startswith("admin") and not filename.startswith("examples")] @@ -129,16 +129,16 @@ def breakpoints(): Field('filename', requires=IS_IN_SET(files), label=T("Filename")), Field('lineno', 'integer', label=T("Line number"), requires=IS_NOT_EMPTY()), - Field('temporary', 'boolean', label=T("Temporary"), + Field('temporary', 'boolean', label=T("Temporary"), comment=T("deleted after first hit")), Field('condition', 'string', label=T("Condition"), comment=T("honored only if the expression evaluates to true")), ) if form.accepts(request.vars, session): - filename = os.path.join(request.env['applications_parent'], + filename = os.path.join(request.env['applications_parent'], 'applications', form.vars.filename) - err = qdb_debugger.do_set_breakpoint(filename, + err = qdb_debugger.do_set_breakpoint(filename, form.vars.lineno, form.vars.temporary, form.vars.condition) @@ -150,9 +150,9 @@ def breakpoints(): qdb_debugger.do_clear(item[7:]) breakpoints = [{'number': bp[0], 'filename': os.path.basename(bp[1]), - 'path': bp[1], 'lineno': bp[2], - 'temporary': bp[3], 'enabled': bp[4], 'hits': bp[5], - 'condition': bp[6]} + 'path': bp[1], 'lineno': bp[2], + 'temporary': bp[3], 'enabled': bp[4], 'hits': bp[5], + 'condition': bp[6]} for bp in qdb_debugger.do_list_breakpoint()] return dict(breakpoints=breakpoints, form=form) @@ -160,11 +160,11 @@ def breakpoints(): def toggle_breakpoint(): "Set or clear a breakpoint" - + lineno = None ok = None try: - filename = os.path.join(request.env['applications_parent'], + filename = os.path.join(request.env['applications_parent'], 'applications', request.vars.filename) if not request.vars.data: # ace send us the line number! @@ -184,7 +184,7 @@ def toggle_breakpoint(): no, bp_filename, bp_lineno, temporary, enabled, hits, cond = bp if filename == bp_filename and lineno == bp_lineno: err = qdb_debugger.do_clear_breakpoint(filename, lineno) - response.flash = T("Removed Breakpoint on %s at line %s", ( + response.flash = T("Removed Breakpoint on %s at line %s", ( filename, lineno)) ok = False break @@ -199,3 +199,4 @@ def toggle_breakpoint(): session.flash = str(e) return response.json({'ok': ok, 'lineno': lineno}) + diff --git a/applications/admin/controllers/default.py b/applications/admin/controllers/default.py index 7b3a0621..b6314641 100644 --- a/applications/admin/controllers/default.py +++ b/applications/admin/controllers/default.py @@ -213,7 +213,7 @@ def site(): else: session.flash = \ DIV(T('unable to create application "%s"' % appname), - PRE(error)) + PRE(error)) redirect(URL(r=request)) elif form_update.accepted: @@ -241,18 +241,18 @@ def site(): DIV(T('Unable to download app because:'),PRE(str(e))) redirect(URL(r=request)) fname = form_update.vars.url - + elif form_update.accepted and form_update.vars.file: fname = request.vars.file.filename f = request.vars.file.file - + else: session.flash = 'No file uploaded and no URL specified' redirect(URL(r=request)) if f: appname = cleanpath(form_update.vars.name) - installed = app_install(appname, f, + installed = app_install(appname, f, request, fname, overwrite=form_update.vars.overwrite) if f and installed: @@ -282,7 +282,7 @@ def site(): apps = sorted(apps,lambda a,b:cmp(a.upper(),b.upper())) - return dict(app=None, apps=apps, myversion=myversion, + return dict(app=None, apps=apps, myversion=myversion, form_create=form_create, form_update=form_update) @@ -340,7 +340,7 @@ def pack_plugin(): def upgrade_web2py(): dialog = FORM.confirm(T('Upgrade'), - {T('Cancel'):URL('site')}) + {T('Cancel'):URL('site')}) if dialog.accepted: (success, error) = upgrade(request) if success: @@ -355,7 +355,7 @@ def uninstall(): dialog = FORM.confirm(T('Uninstall'), {T('Cancel'):URL('site')}) - + if dialog.accepted: if MULTI_USER_MODE: if is_manager() and db(db.app.name==app).delete(): @@ -1227,7 +1227,7 @@ def create_file(): if request.vars.plugin and not filename.startswith('plugin_%s/' % request.vars.plugin): filename = 'plugin_%s/%s' % (request.vars.plugin, filename) text = '' - + else: redirect(request.vars.sender+anchor) @@ -1641,7 +1641,7 @@ def git_pull(): session.flash = GIT_MISSING redirect(URL('site')) dialog = FORM.confirm(T('Pull'), - {T('Cancel'):URL('site')}) + {T('Cancel'):URL('site')}) if dialog.accepted: try: repo = Repo(os.path.join(apath(r=request),app)) @@ -1698,3 +1698,4 @@ def git_push(): redirect(URL('site')) return dict(app=app,form=form) + diff --git a/applications/admin/controllers/gae.py b/applications/admin/controllers/gae.py index ee20442b..1caa283c 100644 --- a/applications/admin/controllers/gae.py +++ b/applications/admin/controllers/gae.py @@ -91,3 +91,4 @@ def callback(): return (output+errors).replace('\n','
') + diff --git a/applications/admin/controllers/mercurial.py b/applications/admin/controllers/mercurial.py index 6c063097..4f35dd54 100644 --- a/applications/admin/controllers/mercurial.py +++ b/applications/admin/controllers/mercurial.py @@ -82,3 +82,4 @@ def revision(): ) + diff --git a/applications/admin/controllers/openshift.py b/applications/admin/controllers/openshift.py index 479923d9..f407e725 100644 --- a/applications/admin/controllers/openshift.py +++ b/applications/admin/controllers/openshift.py @@ -26,7 +26,7 @@ def deploy(): kill() except: pass - + ignore_apps = [item for item in apps if not item in form.vars.applications] regex = re.compile('\(applications/\(.*') w2p_origin = os.getcwd() @@ -44,13 +44,13 @@ def deploy(): #shutil.copytree(appsrc,appdest) index.add(['wsgi/'+osname+'/applications/'+i]) new_commit = index.commit("Deploy from Web2py IDE") - + origin = repo.remotes.origin origin.push origin.push() #Git code ends here return dict(form=form,command=cmd) - + class EXISTS(object): def __init__(self, error_message='file not found'): self.error_message = error_message @@ -58,3 +58,4 @@ class EXISTS(object): if os.path.exists(value): return (value,None) return (value,self.error_message) + diff --git a/applications/admin/controllers/plugin_jqmobile.py b/applications/admin/controllers/plugin_jqmobile.py index bc72c15d..77eb14ee 100644 --- a/applications/admin/controllers/plugin_jqmobile.py +++ b/applications/admin/controllers/plugin_jqmobile.py @@ -8,3 +8,4 @@ def about(): return locals() + diff --git a/applications/admin/controllers/shell.py b/applications/admin/controllers/shell.py index 9ce45262..728c2000 100644 --- a/applications/admin/controllers/shell.py +++ b/applications/admin/controllers/shell.py @@ -45,3 +45,4 @@ def reset(): return 'done' + diff --git a/applications/admin/controllers/toolbar.py b/applications/admin/controllers/toolbar.py index 25e83a3e..dfe220b8 100644 --- a/applications/admin/controllers/toolbar.py +++ b/applications/admin/controllers/toolbar.py @@ -29,3 +29,4 @@ def profiler(): return data + diff --git a/applications/admin/controllers/webservices.py b/applications/admin/controllers/webservices.py index 4fcc4634..9eab0f2b 100644 --- a/applications/admin/controllers/webservices.py +++ b/applications/admin/controllers/webservices.py @@ -90,7 +90,7 @@ def attach_debugger(host='localhost', port=6000, authkey='secret password'): if isinstance(authkey, unicode): authkey = authkey.encode('utf8') - + if not hasattr(gluon.debug, 'qdb_listener'): # create a remote debugger server and wait for connection address = (host, port) # family is deduced to be 'AF_INET' @@ -128,3 +128,4 @@ def call(): session.forget() return service() + diff --git a/applications/admin/controllers/wizard.py b/applications/admin/controllers/wizard.py index ca60ecdd..841263c4 100644 --- a/applications/admin/controllers/wizard.py +++ b/applications/admin/controllers/wizard.py @@ -556,3 +556,4 @@ def call(): return service() os.unlink(file) + diff --git a/applications/admin/models/0.py b/applications/admin/models/0.py index ec92f27a..1d7abe3e 100644 --- a/applications/admin/models/0.py +++ b/applications/admin/models/0.py @@ -13,9 +13,9 @@ TEXT_EDITOR = 'codemirror' or 'ace' or 'edit_area' or 'amy' ## Editor Color scheme (only for ace) TEXT_EDITOR_THEME = ( - "chrome", "clouds", "clouds_midnight", "cobalt", "crimson_editor", "dawn", + "chrome", "clouds", "clouds_midnight", "cobalt", "crimson_editor", "dawn", "dreamweaver", "eclipse", "idle_fingers", "kr_theme", "merbivore", - "merbivore_soft", "monokai", "mono_industrial", "pastel_on_dark", + "merbivore_soft", "monokai", "mono_industrial", "pastel_on_dark", "solarized_dark", "solarized_light", "textmate", "tomorrow", "tomorrow_night", "tomorrow_night_blue", "tomorrow_night_bright", "tomorrow_night_eighties", "twilight", "vibrant_ink")[0] @@ -80,3 +80,4 @@ if 'adminLanguage' in request.cookies and not (request.cookies['adminLanguage'] T.force(request.cookies['adminLanguage'].value) + diff --git a/applications/admin/models/0_imports.py b/applications/admin/models/0_imports.py index 0b3b4597..ecb8cbcd 100644 --- a/applications/admin/models/0_imports.py +++ b/applications/admin/models/0_imports.py @@ -30,3 +30,4 @@ from gluon.restricted import * from gluon.compileapp import compile_application, remove_compiled_application + diff --git a/applications/admin/models/access.py b/applications/admin/models/access.py index a7066e4e..f2366669 100644 --- a/applications/admin/models/access.py +++ b/applications/admin/models/access.py @@ -147,7 +147,7 @@ if request.controller == "webservices": time.sleep(10) raise HTTP(403,"Not authorized") elif not session.authorized and not \ - (request.controller+'/'+request.function in + (request.controller+'/'+request.function in ('default/index','default/user','plugin_jqmobile/index','plugin_jqmobile/about')): if request.env.query_string: @@ -169,3 +169,4 @@ if request.controller=='appadmin' and DEMO_MODE: session.flash = 'Appadmin disabled in demo mode' redirect(URL('default','sites')) + diff --git a/applications/admin/models/buttons.py b/applications/admin/models/buttons.py index 594acd3e..e60e6c00 100644 --- a/applications/admin/models/buttons.py +++ b/applications/admin/models/buttons.py @@ -36,3 +36,4 @@ def searchbox(elementid): return TAG[''](LABEL(IMG(_id="search_start",_src=URL('static', 'images/search.png'), _alt=T('filter')), _class='icon', _for=elementid), ' ', INPUT(_id=elementid, _type='text', _size=12)) + diff --git a/applications/admin/models/db.py b/applications/admin/models/db.py index 4b98283a..11eb9c0a 100644 --- a/applications/admin/models/db.py +++ b/applications/admin/models/db.py @@ -38,3 +38,4 @@ def is_manager(): return False + diff --git a/applications/admin/models/menu.py b/applications/admin/models/menu.py index 0ec6a810..b6dcdfd6 100644 --- a/applications/admin/models/menu.py +++ b/applications/admin/models/menu.py @@ -26,7 +26,7 @@ if not session.authorized: else: response.menu.append((T('Logout'), False, URL(_a,'default',f='logout'))) - response.menu.append((T('Debug'), False, + response.menu.append((T('Debug'), False, URL(_a, 'debug','interact'))) if os.path.exists('applications/examples'): @@ -35,3 +35,4 @@ else: response.menu.append((T('Help'), False, 'http://web2py.com/examples')) + diff --git a/applications/admin/models/plugin_multiselect.py b/applications/admin/models/plugin_multiselect.py index d6e0320a..09b9e7e0 100644 --- a/applications/admin/models/plugin_multiselect.py +++ b/applications/admin/models/plugin_multiselect.py @@ -3,3 +3,4 @@ response.files.append(URL('static','plugin_multiselect/multi-select.css')) response.files.append(URL('static','plugin_multiselect/start.js')) + diff --git a/applications/examples/controllers/ajax_examples.py b/applications/examples/controllers/ajax_examples.py index 56652e5b..f7c49084 100644 --- a/applications/examples/controllers/ajax_examples.py +++ b/applications/examples/controllers/ajax_examples.py @@ -21,3 +21,4 @@ def fade(): + diff --git a/applications/examples/controllers/appadmin.py b/applications/examples/controllers/appadmin.py index bc8ae060..f00eba91 100644 --- a/applications/examples/controllers/appadmin.py +++ b/applications/examples/controllers/appadmin.py @@ -444,3 +444,4 @@ def ccache(): + diff --git a/applications/examples/controllers/cache_examples.py b/applications/examples/controllers/cache_examples.py index 930f23c0..026a1f82 100644 --- a/applications/examples/controllers/cache_examples.py +++ b/applications/examples/controllers/cache_examples.py @@ -49,3 +49,4 @@ def cache_controller_and_view(): return response.render(d) + diff --git a/applications/examples/controllers/default.py b/applications/examples/controllers/default.py index 80f00979..0e61ae93 100644 --- a/applications/examples/controllers/default.py +++ b/applications/examples/controllers/default.py @@ -74,3 +74,4 @@ def changelog(): filename = os.path.join(request.env.gluon_parent, 'CHANGELOG') return response.render(dict(changelog=MARKMIN(read_file(filename)))) + diff --git a/applications/examples/controllers/form_examples.py b/applications/examples/controllers/form_examples.py index ffcc46e1..cddd54b0 100644 --- a/applications/examples/controllers/form_examples.py +++ b/applications/examples/controllers/form_examples.py @@ -26,3 +26,4 @@ def form(): + diff --git a/applications/examples/controllers/global.py b/applications/examples/controllers/global.py index 1c5f2a78..2855e3cb 100644 --- a/applications/examples/controllers/global.py +++ b/applications/examples/controllers/global.py @@ -80,3 +80,4 @@ def vars(): + diff --git a/applications/examples/controllers/layout_examples.py b/applications/examples/controllers/layout_examples.py index f20c19ec..5f10acfb 100644 --- a/applications/examples/controllers/layout_examples.py +++ b/applications/examples/controllers/layout_examples.py @@ -23,3 +23,4 @@ def basic(): + diff --git a/applications/examples/controllers/session_examples.py b/applications/examples/controllers/session_examples.py index 806c395b..bbd1a421 100644 --- a/applications/examples/controllers/session_examples.py +++ b/applications/examples/controllers/session_examples.py @@ -11,3 +11,4 @@ def counter(): + diff --git a/applications/examples/controllers/simple_examples.py b/applications/examples/controllers/simple_examples.py index 94dfd729..d740ced5 100644 --- a/applications/examples/controllers/simple_examples.py +++ b/applications/examples/controllers/simple_examples.py @@ -138,3 +138,4 @@ Quoted text def ajaxwiki_onclick(): return MARKMIN(request.vars.text).xml() + diff --git a/applications/examples/controllers/spreadsheet.py b/applications/examples/controllers/spreadsheet.py index 95c906bf..9a80c18e 100644 --- a/applications/examples/controllers/spreadsheet.py +++ b/applications/examples/controllers/spreadsheet.py @@ -8,3 +8,4 @@ def index(): #sheet.cell('r0c3',value='=r0c0+r0c1+r0c2',readonly=True) return dict(sheet=sheet) + diff --git a/applications/examples/controllers/template_examples.py b/applications/examples/controllers/template_examples.py index 3a6c913f..52aba5a4 100644 --- a/applications/examples/controllers/template_examples.py +++ b/applications/examples/controllers/template_examples.py @@ -34,3 +34,4 @@ def beautify(): + diff --git a/applications/examples/models/feeds_reader.py b/applications/examples/models/feeds_reader.py index 5921dfa8..787f0a4c 100644 --- a/applications/examples/models/feeds_reader.py +++ b/applications/examples/models/feeds_reader.py @@ -47,3 +47,4 @@ def code_feed_reader(project,mode='div'): + diff --git a/applications/examples/models/markmin.py b/applications/examples/models/markmin.py index da761a6a..b7352c88 100644 --- a/applications/examples/models/markmin.py +++ b/applications/examples/models/markmin.py @@ -38,3 +38,4 @@ def get_content(b=None,\ return html + diff --git a/applications/examples/models/menu.py b/applications/examples/models/menu.py index 9c7eeefb..dc5de925 100644 --- a/applications/examples/models/menu.py +++ b/applications/examples/models/menu.py @@ -43,3 +43,4 @@ def toggle_menuclass(cssclass='pressed',menuid='headermenu'): else: return '' + diff --git a/applications/welcome/controllers/appadmin.py b/applications/welcome/controllers/appadmin.py index bc8ae060..f00eba91 100644 --- a/applications/welcome/controllers/appadmin.py +++ b/applications/welcome/controllers/appadmin.py @@ -444,3 +444,4 @@ def ccache(): + diff --git a/applications/welcome/controllers/default.py b/applications/welcome/controllers/default.py index 4c4b563d..7392c41d 100644 --- a/applications/welcome/controllers/default.py +++ b/applications/welcome/controllers/default.py @@ -71,3 +71,4 @@ def data(): LOAD('default','data.load',args='tables',ajax=True,user_signature=True) """ return dict(form=crud()) + diff --git a/applications/welcome/models/db.py b/applications/welcome/models/db.py index 54a0b231..95ab525c 100644 --- a/applications/welcome/models/db.py +++ b/applications/welcome/models/db.py @@ -11,7 +11,7 @@ if not request.env.web2py_runtime_gae: ## if NOT running on Google App Engine use SQLite or other DB - db = DAL('sqlite://storage.sqlite') + db = DAL('sqlite://storage.sqlite') else: ## connect to Google BigTable (optional 'google:datastore://namespace') db = DAL('google:datastore') @@ -81,3 +81,4 @@ use_janrain(auth,filename='private/janrain.key') ## after defining tables, uncomment below to enable auditing # auth.enable_record_versioning(db) + diff --git a/applications/welcome/models/menu.py b/applications/welcome/models/menu.py index dcf1c275..989328c4 100644 --- a/applications/welcome/models/menu.py +++ b/applications/welcome/models/menu.py @@ -33,7 +33,7 @@ def _(): # shortcuts app = request.application ctr = request.controller - # useful links to internal and external resources + # useful links to internal and external resources response.menu+=[ (SPAN('web2py',_class='highlighted'),False, 'http://web2py.com', [ (T('My Sites'),False,URL('admin','default','site')), @@ -99,3 +99,4 @@ def _(): )] _() + diff --git a/cgihandler.py b/cgihandler.py index c4c14993..a7bbcb1b 100755 --- a/cgihandler.py +++ b/cgihandler.py @@ -66,3 +66,4 @@ wsgiref.handlers.CGIHandler().run(gluon.main.wsgibase) + diff --git a/fcgihandler.py b/fcgihandler.py index f45067a6..2a81b784 100755 --- a/fcgihandler.py +++ b/fcgihandler.py @@ -56,3 +56,4 @@ fcgi.WSGIServer(application, bindAddress='/tmp/fcgi.sock').run() + diff --git a/gaehandler.py b/gaehandler.py index 70e52806..0971b9f8 100755 --- a/gaehandler.py +++ b/gaehandler.py @@ -102,3 +102,4 @@ if __name__ == '__main__': + diff --git a/gluon/__init__.py b/gluon/__init__.py index fd88cd43..795705f5 100644 --- a/gluon/__init__.py +++ b/gluon/__init__.py @@ -53,3 +53,4 @@ if 0: + diff --git a/gluon/admin.py b/gluon/admin.py index f6e70f01..4fd874f9 100644 --- a/gluon/admin.py +++ b/gluon/admin.py @@ -481,3 +481,4 @@ def create_missing_app_folders(request): + diff --git a/gluon/cache.py b/gluon/cache.py index 80fcabae..11c302c6 100644 --- a/gluon/cache.py +++ b/gluon/cache.py @@ -46,13 +46,13 @@ class CacheAbstract(object): Main function is now to provide referenced api documentation. Use CacheInRam or CacheOnDisk instead which are derived from this class. - + Attentions, Michele says: There are signatures inside gdbm files that are used directly by the python gdbm adapter that often are lagging behind in the detection code in python part. - On every occasion that a gdbm store is probed by the python adapter, + On every occasion that a gdbm store is probed by the python adapter, the probe fails, because gdbm file version is newer. Using gdbm directly from C would work, because there is backward compatibility, but not from python! @@ -258,7 +258,7 @@ class CacheOnDisk(CacheAbstract): on self.locker first. Replaces the close method of the returned shelf instance with one that releases the lock upon closing.""" - + storage = None locker = None locked = False @@ -296,7 +296,7 @@ class CacheOnDisk(CacheAbstract): self.initialized = False self.request = request self.folder = folder - + def initialize(self): if self.initialized: return else: self.initialized = True @@ -468,7 +468,7 @@ class Cache(object): """ allow replacing cache.ram with cache.with_prefix(cache.ram,'prefix') it will add prefix to all the cache keys used. - """ + """ return lambda key, f, time_expire=DEFAULT_TIME_EXPIRE, prefix=prefix:\ cache_model(prefix + key, f, time_expire) @@ -492,3 +492,4 @@ def lazy_cache(key=None,time_expire=None,cache_model='ram'): + diff --git a/gluon/cfs.py b/gluon/cfs.py index 358540ca..ceb52f18 100644 --- a/gluon/cfs.py +++ b/gluon/cfs.py @@ -58,3 +58,4 @@ def getcfs(key, filename, filter=None): + diff --git a/gluon/compileapp.py b/gluon/compileapp.py index 3bc81108..ab5f063a 100644 --- a/gluon/compileapp.py +++ b/gluon/compileapp.py @@ -371,7 +371,7 @@ _base_environment_['SQLField'] = SQLField # for backward compatibility _base_environment_['SQLFORM'] = SQLFORM _base_environment_['SQLTABLE'] = SQLTABLE _base_environment_['LOAD'] = LOAD - + def build_environment(request, response, session, store_current=True): """ Build the environment dictionary into which web2py files are executed. @@ -707,3 +707,4 @@ if __name__ == '__main__': + diff --git a/gluon/contenttype.py b/gluon/contenttype.py index cb11c687..cb0786ea 100644 --- a/gluon/contenttype.py +++ b/gluon/contenttype.py @@ -724,3 +724,4 @@ def contenttype(filename, default='text/plain'): + diff --git a/gluon/contrib/AuthorizeNet.py b/gluon/contrib/AuthorizeNet.py index 8b24ef0a..8a6c7002 100755 --- a/gluon/contrib/AuthorizeNet.py +++ b/gluon/contrib/AuthorizeNet.py @@ -264,3 +264,4 @@ if __name__=='__main__': + diff --git a/gluon/contrib/DowCommerce.py b/gluon/contrib/DowCommerce.py index d71c3911..e1a25672 100644 --- a/gluon/contrib/DowCommerce.py +++ b/gluon/contrib/DowCommerce.py @@ -244,3 +244,4 @@ if __name__=='__main__': + diff --git a/gluon/contrib/__init__.py b/gluon/contrib/__init__.py index 12a6f48e..e3c0074c 100644 --- a/gluon/contrib/__init__.py +++ b/gluon/contrib/__init__.py @@ -6,3 +6,4 @@ + diff --git a/gluon/contrib/aes.py b/gluon/contrib/aes.py index cfc212b5..375ca55f 100644 --- a/gluon/contrib/aes.py +++ b/gluon/contrib/aes.py @@ -502,3 +502,4 @@ aes_Rcon = array('B', ) + diff --git a/gluon/contrib/autolinks.py b/gluon/contrib/autolinks.py index be72db03..5ff1113e 100644 --- a/gluon/contrib/autolinks.py +++ b/gluon/contrib/autolinks.py @@ -205,3 +205,4 @@ if __name__=="__main__": print test() + diff --git a/gluon/contrib/feedparser.py b/gluon/contrib/feedparser.py index 1afb2c11..827ce866 100755 --- a/gluon/contrib/feedparser.py +++ b/gluon/contrib/feedparser.py @@ -3911,3 +3911,4 @@ def parse(url_file_stream_or_string, etag=None, modified=None, agent=None, refer + diff --git a/gluon/contrib/gae_memcache.py b/gluon/contrib/gae_memcache.py index 0a482e43..2b4ef4db 100644 --- a/gluon/contrib/gae_memcache.py +++ b/gluon/contrib/gae_memcache.py @@ -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) + diff --git a/gluon/contrib/gae_retry.py b/gluon/contrib/gae_retry.py index 134112a4..82bb37e0 100644 --- a/gluon/contrib/gae_retry.py +++ b/gluon/contrib/gae_retry.py @@ -91,3 +91,4 @@ def autoretry_datastore_timeouts(attempts=5.0, interval=0.1, exponent=2.0): + diff --git a/gluon/contrib/generics.py b/gluon/contrib/generics.py index 0c9c2a23..97abccf3 100644 --- a/gluon/contrib/generics.py +++ b/gluon/contrib/generics.py @@ -68,3 +68,4 @@ def pdf_from_html(html): + diff --git a/gluon/contrib/google_wallet.py b/gluon/contrib/google_wallet.py index 9ea64ea6..3bd88e70 100644 --- a/gluon/contrib/google_wallet.py +++ b/gluon/contrib/google_wallet.py @@ -20,3 +20,4 @@ def button(merchant_id="123456789012345", + diff --git a/gluon/contrib/gql.py b/gluon/contrib/gql.py index 92b637e9..03002ccb 100644 --- a/gluon/contrib/gql.py +++ b/gluon/contrib/gql.py @@ -10,3 +10,4 @@ from gluon.dal import DAL, Field, Table, Query, Set, Expression, Row, Rows, driv + diff --git a/gluon/contrib/imageutils.py b/gluon/contrib/imageutils.py index e8094458..b01a283c 100644 --- a/gluon/contrib/imageutils.py +++ b/gluon/contrib/imageutils.py @@ -59,3 +59,4 @@ def THUMB(image, nx=120, ny=120, gae=False, name='thumb'): return image + diff --git a/gluon/contrib/memdb.py b/gluon/contrib/memdb.py index ae2189aa..012fee05 100644 --- a/gluon/contrib/memdb.py +++ b/gluon/contrib/memdb.py @@ -912,3 +912,4 @@ if __name__ == '__main__': + diff --git a/gluon/contrib/pam.py b/gluon/contrib/pam.py index 4622b7cc..a0f3a983 100644 --- a/gluon/contrib/pam.py +++ b/gluon/contrib/pam.py @@ -128,3 +128,4 @@ if __name__ == "__main__": + diff --git a/gluon/contrib/pbkdf2.py b/gluon/contrib/pbkdf2.py index a58a9dd1..b96bec4f 100644 --- a/gluon/contrib/pbkdf2.py +++ b/gluon/contrib/pbkdf2.py @@ -130,3 +130,4 @@ if __name__ == '__main__': test() + diff --git a/gluon/contrib/populate.py b/gluon/contrib/populate.py index 38760f00..66d08b79 100644 --- a/gluon/contrib/populate.py +++ b/gluon/contrib/populate.py @@ -172,3 +172,4 @@ if __name__ == '__main__': + diff --git a/gluon/contrib/pyfpdf.py b/gluon/contrib/pyfpdf.py index 1cc8c8f0..1bd0f404 100644 --- a/gluon/contrib/pyfpdf.py +++ b/gluon/contrib/pyfpdf.py @@ -10,3 +10,4 @@ from fpdf import * # import warnings # warnings.warn("pyfpdf package name is deprecated, please use fpdf instead") + diff --git a/gluon/contrib/qdb.py b/gluon/contrib/qdb.py index a23038d2..10e7af8a 100644 --- a/gluon/contrib/qdb.py +++ b/gluon/contrib/qdb.py @@ -965,3 +965,4 @@ if __name__ == '__main__': + diff --git a/gluon/contrib/redis_cache.py b/gluon/contrib/redis_cache.py index 2f2366d9..b6aa6630 100644 --- a/gluon/contrib/redis_cache.py +++ b/gluon/contrib/redis_cache.py @@ -168,3 +168,4 @@ class RedisClient(object): + diff --git a/gluon/contrib/redis_session.py b/gluon/contrib/redis_session.py index e8bacfcd..6ffef629 100644 --- a/gluon/contrib/redis_session.py +++ b/gluon/contrib/redis_session.py @@ -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) - - \ No newline at end of file + + diff --git a/gluon/contrib/rss2.py b/gluon/contrib/rss2.py index 47fde9d2..301a283a 100644 --- a/gluon/contrib/rss2.py +++ b/gluon/contrib/rss2.py @@ -593,3 +593,4 @@ if __name__ == '__main__': + diff --git a/gluon/contrib/shell.py b/gluon/contrib/shell.py index 227a1aec..d21d7870 100755 --- a/gluon/contrib/shell.py +++ b/gluon/contrib/shell.py @@ -271,3 +271,4 @@ if __name__=='__main__': + diff --git a/gluon/contrib/simplejsonrpc.py b/gluon/contrib/simplejsonrpc.py index 5a29b5b8..cffaee7b 100644 --- a/gluon/contrib/simplejsonrpc.py +++ b/gluon/contrib/simplejsonrpc.py @@ -152,3 +152,4 @@ if __name__ == "__main__": + diff --git a/gluon/contrib/sms_utils.py b/gluon/contrib/sms_utils.py index 5777661e..b5e32937 100644 --- a/gluon/contrib/sms_utils.py +++ b/gluon/contrib/sms_utils.py @@ -117,3 +117,4 @@ def sms_email(number,provider): + diff --git a/gluon/contrib/spreadsheet.py b/gluon/contrib/spreadsheet.py index b13dced0..1fd956fd 100644 --- a/gluon/contrib/spreadsheet.py +++ b/gluon/contrib/spreadsheet.py @@ -880,3 +880,4 @@ if __name__ == '__main__': + diff --git a/gluon/contrib/stripe.py b/gluon/contrib/stripe.py index dbde9117..8bf25c8a 100644 --- a/gluon/contrib/stripe.py +++ b/gluon/contrib/stripe.py @@ -67,3 +67,4 @@ if __name__=='__main__': + diff --git a/gluon/contrib/taskbar_widget.py b/gluon/contrib/taskbar_widget.py index 8f9cba9e..c053f2e9 100644 --- a/gluon/contrib/taskbar_widget.py +++ b/gluon/contrib/taskbar_widget.py @@ -248,3 +248,4 @@ class TaskBarIcon: + diff --git a/gluon/contrib/timecollect.py b/gluon/contrib/timecollect.py index 601b7fb2..502a1b25 100644 --- a/gluon/contrib/timecollect.py +++ b/gluon/contrib/timecollect.py @@ -96,3 +96,4 @@ if __name__=='__main__': + diff --git a/gluon/contrib/user_agent_parser.py b/gluon/contrib/user_agent_parser.py index e84f4892..27476f69 100644 --- a/gluon/contrib/user_agent_parser.py +++ b/gluon/contrib/user_agent_parser.py @@ -521,3 +521,4 @@ class mobilize(object): + diff --git a/gluon/contrib/webclient.py b/gluon/contrib/webclient.py index 8791ff1d..48827a9a 100644 --- a/gluon/contrib/webclient.py +++ b/gluon/contrib/webclient.py @@ -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() + diff --git a/gluon/contrib/websocket_messaging.py b/gluon/contrib/websocket_messaging.py index 890eb295..2a385236 100644 --- a/gluon/contrib/websocket_messaging.py +++ b/gluon/contrib/websocket_messaging.py @@ -195,3 +195,4 @@ if __name__ == "__main__": + diff --git a/gluon/custom_import.py b/gluon/custom_import.py index 6db23d2e..a3e28964 100644 --- a/gluon/custom_import.py +++ b/gluon/custom_import.py @@ -188,3 +188,4 @@ class TrackImporter(object): return file TRACK_IMPORTER = TrackImporter() + diff --git a/gluon/dal.py b/gluon/dal.py index 05d054ae..36d4d3bb 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -500,7 +500,7 @@ class ConnectionPool(object): # ## this allows gluon to commit/rollback all dbs in this thread - def close(self,action='commit',really=True): + def close(self,action='commit',really=True): if action: if callable(action): action(self) @@ -599,7 +599,7 @@ class BaseAdapter(ConnectionPool): support_distributed_transaction = False uploads_in_blob = False can_select_for_update = True - + TRUE = 'T' FALSE = 'F' types = { @@ -1661,7 +1661,7 @@ class BaseAdapter(ConnectionPool): def prepare(self, key): if self.connection: self.connection.prepare() - + def commit_prepared(self, key): if self.connection: self.connection.commit() @@ -6572,7 +6572,7 @@ def smart_query(fields,text): elif field._db._adapter.dbengine=='google:datastore' and \ field.type in ('list:integer', 'list:string', 'list:reference'): if op == 'contains': new_query = field.contains(value) - else: raise RuntimeError, "Invalid operation" + else: raise RuntimeError, "Invalid operation" else: raise RuntimeError, "Invalid operation" if neg: new_query = ~new_query if query is None: @@ -6596,7 +6596,7 @@ class DAL(object): Field('fieldname2')) """ - def __new__(cls, uri='sqlite://dummy.db', *args, **kwargs): + def __new__(cls, uri='sqlite://dummy.db', *args, **kwargs): if not hasattr(THREAD_LOCAL,'db_instances'): THREAD_LOCAL.db_instances = {} if not hasattr(THREAD_LOCAL,'db_instances_zombie'): @@ -6746,9 +6746,9 @@ class DAL(object): kwargs = dict(db=self,uri=uri, pool_size=pool_size, folder=folder, - db_codec=db_codec, + db_codec=db_codec, credential_decoder=credential_decoder, - driver_args=driver_args or {}, + driver_args=driver_args or {}, adapter_args=adapter_args or {}, do_connect=do_connect) self._adapter = ADAPTERS[self._dbname](**kwargs) @@ -7184,7 +7184,7 @@ def index(): def close(self): self._adapter.close() - if self._db_uid in THREAD_LOCAL.db_instances: + if self._db_uid in THREAD_LOCAL.db_instances: db_group = THREAD_LOCAL.db_instances[self._db_uid] db_group.remove(self) if not db_group: @@ -9548,3 +9548,4 @@ DAL.Table = Table # was necessary in gluon/globals.py session.connect if __name__ == '__main__': import doctest doctest.testmod() + diff --git a/gluon/debug.py b/gluon/debug.py index b638cc12..3936cf47 100644 --- a/gluon/debug.py +++ b/gluon/debug.py @@ -193,3 +193,4 @@ gluon.main.global_settings.debugging = True + diff --git a/gluon/decoder.py b/gluon/decoder.py index 4eecf8ab..010ed7fb 100644 --- a/gluon/decoder.py +++ b/gluon/decoder.py @@ -79,3 +79,4 @@ def decoder(buffer): + diff --git a/gluon/fileutils.py b/gluon/fileutils.py index fd23c604..c6019d16 100644 --- a/gluon/fileutils.py +++ b/gluon/fileutils.py @@ -398,3 +398,4 @@ def abspath(*relpath, **base): + diff --git a/gluon/globals.py b/gluon/globals.py index 7092f330..7b515fe9 100644 --- a/gluon/globals.py +++ b/gluon/globals.py @@ -251,11 +251,11 @@ class Response(Storage): if item.endswith('.css'): has_css = True files.append(item) - + if have_minify and ((self.optimize_css and has_css) or (self.optimize_js and has_js)): # cache for 5 minutes by default key = hashlib.md5(repr(files)).hexdigest() - + cache = self.cache_includes or (current.cache.ram, 60*5) def call_minify(files=files): return minify.minify(files, @@ -344,7 +344,7 @@ class Response(Storage): os.path.getsize(filename) except OSError: pass - + env = request.env # Internet Explorer < 9.0 will not allow downloads over SSL unless caching is enabled if request.is_https and isinstance(env.http_user_agent,str) and \ @@ -388,7 +388,7 @@ class Response(Storage): headers['Content-Disposition'] = \ 'attachment; filename=%s' % filename return self.stream(stream, chunk_size=chunk_size, request=request) - + def json(self, data, default=None): return json(data, default = default or custom_json) @@ -425,9 +425,9 @@ class Response(Storage): dbstats = [TABLE(*[TR(PRE(row[0]),'%.2fms' % (row[1]*1000)) \ for row in i.db._timings]) \ for i in THREAD_LOCAL.instances] - dbtables = dict([(regex_nopasswd.sub('******',i.uri), - {'defined': - sorted(list(set(i.db.tables) - + dbtables = dict([(regex_nopasswd.sub('******',i.uri), + {'defined': + sorted(list(set(i.db.tables) - set(i.db._LAZY_TABLES.keys()))) or '[no defined tables]', 'lazy': sorted(i.db._LAZY_TABLES.keys()) or @@ -489,7 +489,7 @@ class Session(Storage): response.session_id_name = 'session_id_%s' % masterapp.lower() response.session_data_name = 'session_data_%s' % masterapp.lower() response.session_cookie_expires = cookie_expires - + # Load session data from cookie cookies = request.cookies @@ -505,7 +505,7 @@ class Session(Storage): session_cookie_data = cookies[response.session_data_name].value else: session_cookie_data = None - + # if we are supposed to use cookie based session data if cookie_key: response.session_storage_type = 'cookie' @@ -658,11 +658,11 @@ class Session(Storage): name = response.session_data_name value = secure_dumps(dict(self),response.session_cookie_key, compression_level=response.session_cookie_compression_level) expires = response.session_cookie_expires - rcookies = response.cookies - rcookies.pop(name,None) + rcookies = response.cookies + rcookies.pop(name,None) rcookies[name] = value rcookies[name]['path'] = '/' - if expires: + if expires: rcookies[name]['expires'] = expires.strftime(FMT) return True @@ -751,3 +751,4 @@ class Session(Storage): del response.session_file except: pass + diff --git a/gluon/highlight.py b/gluon/highlight.py index 59332571..c66b429e 100644 --- a/gluon/highlight.py +++ b/gluon/highlight.py @@ -349,3 +349,4 @@ if __name__ == '__main__': + diff --git a/gluon/html.py b/gluon/html.py index f8ab3b63..6893b9b4 100644 --- a/gluon/html.py +++ b/gluon/html.py @@ -2064,7 +2064,7 @@ class FORM(DIV): message_onfailure = kwargs.get('message_onfailure', current.T("Errors in form, please check it out.")) message_onchange = kwargs.get('message_onchange', - current.T("Form consecutive submissions not allowed. " + + current.T("Form consecutive submissions not allowed. " + "Try re-submitting or refreshing the form page.")) next = kwargs.get('next',None) for key in ('message_onsuccess','message_onfailure','onsuccess', @@ -2535,3 +2535,4 @@ class MARKMIN(XmlComponent): if __name__ == '__main__': import doctest doctest.testmod() + diff --git a/gluon/http.py b/gluon/http.py index df841036..2dbc14f0 100644 --- a/gluon/http.py +++ b/gluon/http.py @@ -156,3 +156,4 @@ def redirect(location, how=303, client_side=False): + diff --git a/gluon/import_all.py b/gluon/import_all.py index 46f231b8..3406cf3e 100644 --- a/gluon/import_all.py +++ b/gluon/import_all.py @@ -114,3 +114,4 @@ for module in base_modules + contributed_modules: + diff --git a/gluon/languages.py b/gluon/languages.py index 1601f3af..3d94bb0a 100644 --- a/gluon/languages.py +++ b/gluon/languages.py @@ -166,7 +166,7 @@ def read_possible_plural_rules(): pname = modname+'.py' nplurals = getattr(module,'nplurals', DEFAULT_NPLURALS) get_plural_id = getattr( - module,'get_plural_id', + module,'get_plural_id', DEFAULT_GET_PLURAL_ID) construct_plural_form = getattr( module,'construct_plural_form', @@ -210,7 +210,7 @@ def read_possible_languages_aux(langdir): nplurals, # nplurals for current language get_plural_id, # get_plural_id() for current language construct_plural_form) # construct_plural_form() for current language - + plurals = {} flist = oslistdir(langdir) # scan languages directory for plural dict files: @@ -223,7 +223,7 @@ def read_possible_languages_aux(langdir): for fname in flist: if regex_langfile.match(fname) or fname == 'default.py': fname_with_path = pjoin(langdir,fname) - d = read_dict(fname_with_path) + d = read_dict(fname_with_path) lang = fname[:-3] langcode = d.get('!langcode!', lang if lang != 'default' else DEFAULT_LANGUAGE) @@ -241,7 +241,7 @@ def read_possible_languages_aux(langdir): if deflangcode not in langs: # create language from default.py: langs[deflangcode] = deflang[:2]+(0,)+deflang[3:] - + return langs def read_possible_languages(appdir): @@ -403,11 +403,11 @@ class translator(object): notice 1: there is no need to force since, by default, T uses http_accept_language to determine a translation file. - notice 2: + notice 2: en and en-en are considered different languages! - notice 3: + notice 3: if language xx-yy is not found force() probes other similar - languages using such algorithm: + languages using such algorithm: xx-yy.py -> xx.py -> xx-yy*.py -> xx*.py """ @@ -489,7 +489,7 @@ class translator(object): languages[0], (tuple, list)): languages = languages[0] if not languages or languages[0] is None: - # set default language from default.py/DEFAULT_LANGUAGE + # set default language from default.py/DEFAULT_LANGUAGE pl_info = self.get_possible_languages_info('default') if pl_info[2]==0: # langfile_mtime # if languages/default.py is not found @@ -505,7 +505,7 @@ class translator(object): self.current_languages = list(languages) self.force(self.http_accept_language) - + def plural(self, word, n): """ get plural form of word for number *n* NOTE: *word" MUST be defined in current language @@ -619,7 +619,7 @@ class translator(object): self.language_file, ({},allocate_lock())) set_plural(language) - self.accepted_language = language + self.accepted_language = language return languages self.accepted_language = language or self.current_languages[0] self.language_file = self.default_language_file @@ -676,7 +676,7 @@ class translator(object): message = self.params_substitution(message, symbols) return XML(message.translate(ttab_out)) - def M(self, message, symbols={}, language=None, + def M(self, message, symbols={}, language=None, lazy=None, filter=None, ftag=None): """ get cached translated markmin-message with inserted parametes @@ -710,10 +710,10 @@ class translator(object): the ## notation is ignored in multiline strings and strings that start with ##. this is to allow markmin syntax to be translated """ - if isinstance(message, unicode): - message = message.encode('utf8') - if isinstance(prefix, unicode): - prefix = prefix.encode('utf8') + if isinstance(message, unicode): + message = message.encode('utf8') + if isinstance(prefix, unicode): + prefix = prefix.encode('utf8') key = prefix+message mt = self.t.get(key, None) if mt is not None: return mt @@ -831,7 +831,7 @@ class translator(object): """ get cached translated message with inserted parameters(symbols) """ - message = get_from_cache(self.cache, message, + message = get_from_cache(self.cache, message, lambda: self.get_t(message)) if symbols or symbols == 0 or symbols == "": if isinstance(symbols, dict): @@ -905,3 +905,4 @@ def update_all_languages(application_path): if __name__ == '__main__': import doctest doctest.testmod() + diff --git a/gluon/main.py b/gluon/main.py index f3d9db4f..405a4160 100644 --- a/gluon/main.py +++ b/gluon/main.py @@ -235,7 +235,7 @@ def serve_controller(request, response, session): default_headers = [ ('Content-Type', contenttype('.'+request.extension)), ('Cache-Control','no-store, no-cache, must-revalidate, post-check=0, pre-check=0'), - ('Expires', time.strftime('%a, %d %b %Y %H:%M:%S GMT', + ('Expires', time.strftime('%a, %d %b %Y %H:%M:%S GMT', time.gmtime())), ('Pragma', 'no-cache')] for key,value in default_headers: @@ -440,7 +440,7 @@ def wsgibase(environ, responder): local_hosts = global_settings.local_hosts client = get_client(env) x_req_with = str(env.http_x_requested_with).lower() - + request.update( client = client, folder = abspath('applications',app) + os.sep, @@ -524,14 +524,14 @@ def wsgibase(environ, responder): import gluon.debug # activate the debugger gluon.debug.dbg.do_debug(mainpyfile=request.folder) - + serve_controller(request, response, session) except HTTP, http_response: if static_file: return http_response.to(responder,env=env) - + if request.body: request.body.close() @@ -557,9 +557,9 @@ def wsgibase(environ, responder): # if session not in db try store session on filesystem # this must be done after trying to commit database! # ################################################## - + session._try_store_in_cookie_or_file(request, response) - + if request.cid: if response.flash: http_response.headers['web2py-component-flash'] = urllib2.quote(xmlescape(response.flash).replace('\n','')) @@ -858,3 +858,4 @@ class HttpServer(object): except: pass + diff --git a/gluon/messageboxhandler.py b/gluon/messageboxhandler.py index d22ce719..ba2e5ec9 100644 --- a/gluon/messageboxhandler.py +++ b/gluon/messageboxhandler.py @@ -15,3 +15,4 @@ class MessageBoxHandler(logging.Handler): tkMessageBox.showinfo('info1', msg) + diff --git a/gluon/myregex.py b/gluon/myregex.py index 9808a8cb..53a0e792 100644 --- a/gluon/myregex.py +++ b/gluon/myregex.py @@ -33,3 +33,4 @@ regex_extend = re.compile(\ + diff --git a/gluon/newcron.py b/gluon/newcron.py index 286503db..392258e6 100644 --- a/gluon/newcron.py +++ b/gluon/newcron.py @@ -330,7 +330,7 @@ def crondance(applications_parent, ctype='soft', startup=False, apps=None): commands = command # from python docs: - # You do not need shell=True to run a batch file or + # You do not need shell=True to run a batch file or # console-based executable. shell = False @@ -348,3 +348,4 @@ def crondance(applications_parent, ctype='soft', startup=False, apps=None): + diff --git a/gluon/portalocker.py b/gluon/portalocker.py index ed1ef8c5..8d622e4d 100644 --- a/gluon/portalocker.py +++ b/gluon/portalocker.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# portalocker.py +# portalocker.py # Cross-platform (posix/nt) API for flock-style file locking. # Requires python 1.5.2 or better. @@ -142,7 +142,7 @@ class LockedFile(object): def __del__(self): if not self.file is None: self.close() - + def read_locked(filename): fp = LockedFile(filename, 'r') data = fp.read() @@ -165,3 +165,4 @@ if __name__=='__main__': + diff --git a/gluon/reserved_sql_keywords.py b/gluon/reserved_sql_keywords.py index 698768c8..b98af35a 100644 --- a/gluon/reserved_sql_keywords.py +++ b/gluon/reserved_sql_keywords.py @@ -1718,3 +1718,4 @@ ADAPTERS['all'] = reduce(lambda a,b:a.union(b),(x for x in ADAPTERS.values())) + diff --git a/gluon/restricted.py b/gluon/restricted.py index bb5ba670..ee59b16c 100644 --- a/gluon/restricted.py +++ b/gluon/restricted.py @@ -100,7 +100,7 @@ class TicketStorage(Storage): table = self._get_table(self.db, self.tablename, app) rows = self.db(table.ticket_id == ticket_id).select() return cPickle.loads(rows[0].ticket_data) if rows else {} - + class RestrictedError(Exception): @@ -312,3 +312,4 @@ def snapshot(info=None, context=5, code=None, environment=None): + diff --git a/gluon/rewrite.py b/gluon/rewrite.py index f276ff47..56af7d10 100644 --- a/gluon/rewrite.py +++ b/gluon/rewrite.py @@ -197,7 +197,7 @@ def url_out(request, environ, application, controller, function, host = request.env.http_host if not scheme or scheme is True: scheme = request.env.get('wsgi_url_scheme', 'http').lower() \ - if request else 'http' + if request else 'http' if host: host_port = host if not port else host.split(':',1)[0]+':%s'%port url = '%s://%s%s' % (scheme, host_port, url) @@ -579,7 +579,7 @@ def regex_filter_in(e): e['REQUEST_URI'] = e['PATH_INFO'] + (query and ('?' + query) or '') return e - + def sluggify(key): return key.lower().replace('.','_') @@ -609,7 +609,7 @@ def regex_url_in(request, environ): if not match: raise HTTP(400, routes.error_message % 'invalid request', - web2py_error='invalid path') + web2py_error='invalid path') elif match.group('c')=='static': application = match.group('a') version, filename = None, match.group('z') @@ -623,9 +623,9 @@ def regex_url_in(request, environ): else: # ################################################## # parse application, controller and function - # ################################################## - request.application = match.group('a') or routes.default_application - request.controller = match.group('c') or routes.default_controller + # ################################################## + request.application = match.group('a') or routes.default_application + request.controller = match.group('c') or routes.default_controller request.function = match.group('f') or routes.default_function request.raw_extension = match.group('e') request.extension = request.raw_extension or 'html' @@ -1316,3 +1316,4 @@ def get_effective_router(appname): if not routers or appname not in routers: return None return Storage(routers[appname]) # return a copy + diff --git a/gluon/rocket.py b/gluon/rocket.py index 616c0bc9..e0a138a4 100644 --- a/gluon/rocket.py +++ b/gluon/rocket.py @@ -1881,3 +1881,4 @@ if __name__=='__main__': + diff --git a/gluon/sanitizer.py b/gluon/sanitizer.py index fa5ffc4e..80c94c03 100644 --- a/gluon/sanitizer.py +++ b/gluon/sanitizer.py @@ -229,3 +229,4 @@ def sanitize(text, permitted_tags=[ + diff --git a/gluon/scheduler.py b/gluon/scheduler.py index 00bc2650..9c12ad0a 100644 --- a/gluon/scheduler.py +++ b/gluon/scheduler.py @@ -430,7 +430,7 @@ class Scheduler(MetaScheduler): current._scheduler = self self.define_tables(db,migrate=migrate) - + def now(self): return self.utc_time and datetime.datetime.utcnow() or datetime.datetime.now() @@ -440,7 +440,7 @@ class Scheduler(MetaScheduler): scheduler_task.application_name.default= '%s/%s' % ( current.request.application, current.request.controller ) - + def define_tables(self,db,migrate): from gluon.dal import DEFAULT logger.debug('defining tables (migrate=%s)' % migrate) @@ -482,7 +482,7 @@ class Scheduler(MetaScheduler): Field('assigned_worker_name',default='',writable=False), on_define=self.set_requirements, migrate=migrate,format='%(task_name)s') - + db.define_table( 'scheduler_run', @@ -855,7 +855,7 @@ class Scheduler(MetaScheduler): If output == True, returns also the last scheduler_run record scheduler_run record is fetched by a left join, so it can have all fields == None - + """ from gluon.dal import Query sr, st = self.db.scheduler_run, self.db.scheduler_task @@ -962,3 +962,4 @@ def main(): if __name__=='__main__': main() + diff --git a/gluon/serializers.py b/gluon/serializers.py index 8934c9b2..5c18db09 100644 --- a/gluon/serializers.py +++ b/gluon/serializers.py @@ -118,3 +118,4 @@ def rss(feed): + diff --git a/gluon/settings.py b/gluon/settings.py index 504bc1fd..6d0bea7a 100644 --- a/gluon/settings.py +++ b/gluon/settings.py @@ -38,3 +38,4 @@ global_settings.is_jython = \ str(sys.copyright).find('Jython') > 0 + diff --git a/gluon/shell.py b/gluon/shell.py index 2ad019fa..620dfbc3 100644 --- a/gluon/shell.py +++ b/gluon/shell.py @@ -431,3 +431,4 @@ if __name__ == '__main__': + diff --git a/gluon/sql.py b/gluon/sql.py index f49878de..cbbd4451 100644 --- a/gluon/sql.py +++ b/gluon/sql.py @@ -10,3 +10,4 @@ from dal import DAL, Field, Table, Query, Set, Expression, Row, Rows, DRIVERS, B + diff --git a/gluon/sqlhtml.py b/gluon/sqlhtml.py index 7b46fa3e..0e18ce0c 100644 --- a/gluon/sqlhtml.py +++ b/gluon/sqlhtml.py @@ -243,7 +243,7 @@ class ListWidget(StringWidget): attributes['_style'] = 'list-style:none' nvalue = value or [''] items = [LI(INPUT(_id=_id, _class=_class, _name=_name, - value=v, hideerror=klen(args)+1: - query = (field == id) + query = (field == id) if isinstance(linked_tables,dict): linked_tables = linked_tables.get(table._tablename,[]) if linked_tables is None or referee in linked_tables: @@ -2747,3 +2747,4 @@ class ExporterXML(ExportClass): out.write('\n') out.write('') return str(out.getvalue()) + diff --git a/gluon/storage.py b/gluon/storage.py index 92851139..e7c027d4 100644 --- a/gluon/storage.py +++ b/gluon/storage.py @@ -38,7 +38,7 @@ class Storage(dict): >>> print o.a None """ - __slots__=() + __slots__=() __setattr__ = dict.__setitem__ __delattr__ = dict.__delitem__ __getitem__ = dict.get @@ -47,7 +47,7 @@ class Storage(dict): # http://stackoverflow.com/questions/5247250/why-does-pickle-getstate-accept-as-a-return-value-the-very-instance-it-requi __getstate__ = lambda self: None __copy__ = lambda self: Storage(self) - + def getlist(self,key): """ Return a Storage value as a list. @@ -265,3 +265,4 @@ if __name__ == '__main__': + diff --git a/gluon/streamer.py b/gluon/streamer.py index 1b6dab2b..5b192796 100644 --- a/gluon/streamer.py +++ b/gluon/streamer.py @@ -118,3 +118,4 @@ def stream_file_or_304_or_206( else: wrapped = streamer(stream, chunk_size=chunk_size, bytes=bytes) raise HTTP(status, wrapped, **headers) + diff --git a/gluon/template.py b/gluon/template.py index 179b8396..ec05e4a6 100644 --- a/gluon/template.py +++ b/gluon/template.py @@ -216,7 +216,7 @@ class TemplateParser(object): # These are used for re-indentation. # Indent + 1 re_block = compile('^(elif |else:|except:|except |finally:).*$',DOTALL) - + # Indent - 1 re_unblock = compile('^(return|continue|break|raise)( .*)?$', DOTALL) # Indent - 1 @@ -504,7 +504,7 @@ class TemplateParser(object): self.content.nodes = [] t_content = t.content - + # Set our include, unique by filename t_content.blocks['__include__' + filename] = buf @@ -896,3 +896,4 @@ if __name__ == '__main__': + diff --git a/gluon/tools.py b/gluon/tools.py index 917d5257..72123114 100644 --- a/gluon/tools.py +++ b/gluon/tools.py @@ -625,7 +625,7 @@ class Mail(object): for k,v in headers.iteritems(): payload[k] = encoded_or_raw(v.decode(encoding)) result = {} - try: + try: if self.settings.server == 'logging': logger.warn('email not sent\n%s\nFrom: %s\nTo: %s\nSubject: %s\n\n%s\n%s\n' % \ ('-'*40,sender, @@ -1042,7 +1042,7 @@ class Auth(object): def url(self, f=None, args=None, vars=None, scheme=False): if args is None: args=[] if vars is None: vars={} - return URL(c=self.settings.controller, + return URL(c=self.settings.controller, f=f, args=args, vars=vars,scheme=scheme) def here(self): @@ -1089,7 +1089,7 @@ class Auth(object): url_index = URL(controller,'index') url_login = URL(controller,function,args='login') # ## what happens after registration? - + settings = self.settings = Settings() settings.update(Auth.default_settings) settings.update( @@ -1299,7 +1299,7 @@ class Auth(object): if asdropdown: bar.insert(-1, LI('',_class='divider')) - if self.user_id: + if self.user_id: bar = LI(A(prefix, user_identifier, _href='#'), bar,_class='dropdown') else: @@ -1362,7 +1362,7 @@ class Auth(object): T = current.T reference_user = 'reference %s' % settings.table_user_name def lazy_user (auth = self): - return auth.user_id + return auth.user_id def represent(id,record=None,s=settings): try: user = s.table_user(id) @@ -1425,7 +1425,7 @@ class Auth(object): elif isinstance(signature,self.db.Table): signature_list = [signature] else: - signature_list = signature + signature_list = signature is_not_empty = IS_NOT_EMPTY(error_message=self.messages.is_empty) is_crypted = CRYPT(key=settings.hmac_key, min_length=settings.password_min_length) @@ -1698,7 +1698,7 @@ class Auth(object): """ perform basic login. reads current.request.env.http_authorization - and returns basic_allowed,basic_accepted,user + and returns basic_allowed,basic_accepted,user """ if not self.settings.allow_basic_login: return (False,False,False) @@ -1715,7 +1715,7 @@ class Auth(object): user = Storage(self.table_user()._filter_fields(user,id=True)) if 'password' in user: del user.password current.session.auth = Storage( - user = user, + user = user, last_visit = current.request.now, expiration = self.settings.expiration, hmac_key = web2py_uuid()) @@ -2182,7 +2182,7 @@ class Auth(object): self.add_membership(self.settings.everybody_group_id, form.vars.id) if self.settings.registration_requires_verification: link = self.url('user',args=('verify_email',key),scheme=True) - + if not self.settings.mailer or \ not self.settings.mailer.send( to=form.vars.email, @@ -2204,7 +2204,7 @@ class Auth(object): session.flash = self.messages.registration_successful user = self.db( table_user[username] == form.vars[username] - ).select().first() + ).select().first() self.login_user(user) session.flash = self.messages.logged_in self.log_event(log, form.vars) @@ -2561,7 +2561,7 @@ class Auth(object): reset_password_key = str(int(time.time()))+'-' + web2py_uuid() link = self.url('user', args=('reset_password',reset_password_key), - scheme=True) + scheme=True) if self.settings.mailer.send( to=user.email, subject=self.messages.reset_password_subject, @@ -4476,7 +4476,7 @@ class PluginManager(object): settings.installed = True settings.update( (k,v) for k,v in defaults.items() if not k in settings) - + def __getattr__(self, key): if not key in self.__dict__: self.__dict__[key] = Storage() @@ -4660,7 +4660,7 @@ class Wiki(object): # WIKI ACCESS POLICY def not_authorized(self,page=None): raise HTTP(401) - def can_read(self,page): + def can_read(self,page): if 'everybody' in page.can_read or not self.manage_permissions: return True elif self.auth.user: @@ -5027,3 +5027,4 @@ if __name__ == '__main__': + diff --git a/gluon/utf8.py b/gluon/utf8.py index 1af3fe15..06402c61 100644 --- a/gluon/utf8.py +++ b/gluon/utf8.py @@ -655,3 +655,4 @@ if __name__ == '__main__': + diff --git a/gluon/utils.py b/gluon/utils.py index ecc957bc..e3287f49 100644 --- a/gluon/utils.py +++ b/gluon/utils.py @@ -208,11 +208,11 @@ def web2py_uuid(ctokens=UNPACKED_CTOKENS): if HAVE_URANDOM: urand_longs = struct.unpack('=QQ', fast_urandom16()) byte_s = struct.pack('=QQ', - rand_longs[0]^urand_longs[0]^ctokens[0], + rand_longs[0]^urand_longs[0]^ctokens[0], rand_longs[1]^urand_longs[1]^ctokens[1]) else: - byte_s = struct.pack('=QQ', - rand_longs[0]^ctokens[0], + byte_s = struct.pack('=QQ', + rand_longs[0]^ctokens[0], rand_longs[1]^ctokens[1]) return str(uuid.UUID(bytes=byte_s, version=4)) @@ -261,3 +261,4 @@ def is_valid_ip_address(address): + diff --git a/gluon/validators.py b/gluon/validators.py index dbf59fc5..49fabdf1 100644 --- a/gluon/validators.py +++ b/gluon/validators.py @@ -2797,7 +2797,7 @@ class IS_STRONG(object): """ - def __init__(self, min=None, max=None, upper=None, lower=None, number=None, + def __init__(self, min=None, max=None, upper=None, lower=None, number=None, entropy=None, special=None, specials=r'~!@#$%^&*()_+-=?<>,.:;{}[]|', invalid=' "', error_message=None, es=False): @@ -3256,3 +3256,4 @@ if __name__ == '__main__': + diff --git a/gluon/widget.py b/gluon/widget.py index af9c2e47..7b3cb53c 100644 --- a/gluon/widget.py +++ b/gluon/widget.py @@ -1227,3 +1227,4 @@ end tell + diff --git a/gluon/winservice.py b/gluon/winservice.py index 3b518214..67933796 100644 --- a/gluon/winservice.py +++ b/gluon/winservice.py @@ -173,3 +173,4 @@ if __name__ == '__main__': + diff --git a/gluon/xmlrpc.py b/gluon/xmlrpc.py index 6bf931cb..756f08b7 100644 --- a/gluon/xmlrpc.py +++ b/gluon/xmlrpc.py @@ -26,3 +26,4 @@ def handler(request, response, methods): + diff --git a/isapiwsgihandler.py b/isapiwsgihandler.py index 28973d2d..bce968b1 100644 --- a/isapiwsgihandler.py +++ b/isapiwsgihandler.py @@ -38,3 +38,4 @@ if __name__=='__main__': + diff --git a/modpythonhandler.py b/modpythonhandler.py index 4ed135f1..0973d6d6 100755 --- a/modpythonhandler.py +++ b/modpythonhandler.py @@ -227,3 +227,4 @@ def handler(req): + diff --git a/options_std.py b/options_std.py index 85cd071b..f00acfd8 100644 --- a/options_std.py +++ b/options_std.py @@ -32,3 +32,4 @@ folder = os.getcwd() extcron = None nocron = None + diff --git a/router.example.py b/router.example.py index fef9737c..25cc6aba 100644 --- a/router.example.py +++ b/router.example.py @@ -214,3 +214,4 @@ if __name__ == '__main__': + diff --git a/routes.example.py b/routes.example.py index f44d05bf..206b4f15 100644 --- a/routes.example.py +++ b/routes.example.py @@ -41,14 +41,14 @@ routes_in = ( (BASE+'/$app/appadmin','/$app/appadmin/index'), (BASE+'/$app/appadmin/$anything','/$app/appadmin/$anything'), # do not reroute static files - (BASE+'/$app/static/$anything','/$app/static/$anything'), + (BASE+'/$app/static/$anything','/$app/static/$anything'), # reroute favicon and robots, use exable for lack of better choice ('/favicon.ico', '/examples/static/favicon.ico'), - ('/robots.txt', '/examples/static/robots.txt'), + ('/robots.txt', '/examples/static/robots.txt'), # do other stuff ((r'.*http://otherdomain.com.* (?P.*)', r'/app/ctr\g')), # remove the BASE prefix - (BASE+'/$anything','/$anything'), + (BASE+'/$anything','/$anything'), ) # routes_out, like routes_in translates URL paths created with the web2py URL() @@ -202,3 +202,4 @@ if __name__ == '__main__': + diff --git a/scgihandler.py b/scgihandler.py index e0dd6593..d18fafa8 100755 --- a/scgihandler.py +++ b/scgihandler.py @@ -76,3 +76,4 @@ SCGIServer(application, port=4000).enable_sighandler().run() + diff --git a/setup.py b/setup.py index 37e06275..e4a82eb8 100644 --- a/setup.py +++ b/setup.py @@ -77,3 +77,4 @@ if __name__ == '__main__': #s = raw_input('>') #if s.lower()[:1]=='y': start() + diff --git a/setup_app.py b/setup_app.py index cb57c8fc..54e169cc 100755 --- a/setup_app.py +++ b/setup_app.py @@ -57,3 +57,4 @@ setup(app=['web2py.py'], + diff --git a/setup_exe.py b/setup_exe.py index 9b6e88e0..7855ab38 100755 --- a/setup_exe.py +++ b/setup_exe.py @@ -187,3 +187,4 @@ print "Enjoy web2py " +web2py_version_line + diff --git a/web2py.py b/web2py.py index 26425777..5ce0c209 100755 --- a/web2py.py +++ b/web2py.py @@ -30,3 +30,4 @@ if __name__ == '__main__': + diff --git a/wsgihandler.py b/wsgihandler.py index 85368eb3..bb3c9f77 100644 --- a/wsgihandler.py +++ b/wsgihandler.py @@ -47,3 +47,4 @@ if SOFTCRON: +