p3 fixes in applications

This commit is contained in:
ilvalle
2016-06-28 19:58:20 +02:00
parent 5f80300c5d
commit ea337e07d0
6 changed files with 12 additions and 19 deletions
+4 -5
View File
@@ -15,7 +15,7 @@ from gluon.utils import web2py_uuid
from gluon.tools import Config
from gluon.compileapp import find_exposed_functions
from glob import glob
from gluon._compat import iteritems, PY2, pickle, xrange, urlopen, to_bytes
from gluon._compat import iteritems, PY2, pickle, xrange, urlopen, to_bytes, StringIO, to_native
import shutil
import platform
@@ -382,7 +382,6 @@ def pack_plugin():
def pack_exe(app, base, filenames=None):
import urllib
import zipfile
from cStringIO import StringIO
# Download latest web2py_win and open it with zipfile
download_url = 'http://www.web2py.com/examples/static/web2py_win.zip'
out = StringIO()
@@ -1742,9 +1741,9 @@ def make_link(path):
for key in editable.keys():
check_extension = folder.endswith("%s/%s" % (app, key))
if ext.lower() == editable[key] and check_extension:
return A('"' + tryFile + '"',
_href=URL(r=request,
f='edit/%s/%s/%s' % (app, key, filename))).xml()
return to_native(A('"' + tryFile + '"',
_href=URL(r=request,
f='edit/%s/%s/%s' % (app, key, filename))).xml())
return ''
@@ -4,10 +4,7 @@ import os
import re
import gzip
import tarfile
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
from gluon._compat import StringIO
from xmlrpclib import ProtocolError
from gluon.contrib.simplejsonrpc import ServerProxy
+1 -1
View File
@@ -1,10 +1,10 @@
import sys
import cStringIO
import gluon.contrib.shell
import code
import thread
import cgi
from gluon.shell import env
from gluon._compat import StringIO
if DEMO_MODE or MULTI_USER_MODE:
session.flash = T('disabled in demo mode')
@@ -7,15 +7,11 @@ import platform
import time
import base64
import os
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
from gluon._compat import StringIO
service = Service(globals())
@service.jsonrpc
def login():
"dummy function to test credentials"