diff options
author | disabler <dissy@ya.ru> | 2013-09-22 11:18:09 +0400 |
---|---|---|
committer | disabler <dissy@ya.ru> | 2013-09-22 11:18:09 +0400 |
commit | 8fdfc359baa0f1238f724445a1a2aef8f5890cf1 (patch) | |
tree | a7dd6dbf8ad6957d11a576ea30bf909e8ada9b15 | |
parent | 849601ce43235128a3bc121eb407eef3ffbb3810 (diff) |
fix: thread stack size
-rw-r--r-- | data/url/index.py | 3 | ||||
-rw-r--r-- | kernel.py | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/data/url/index.py b/data/url/index.py index b2375f1..40aab67 100644 --- a/data/url/index.py +++ b/data/url/index.py @@ -140,7 +140,8 @@ if url: color = int('ccc',16) mask = color ^ int('eee',16) for t in url: - ll = urllib2.unquote(t[3].encode('utf8')).decode('utf8') + try: ll = urllib2.unquote(t[3].encode('utf8')).decode('utf8') + except: ll = 'error' lnk = ll if len(ll) < max_link_size else '%s...%s' % (ll[:max_link_size-10],ll[-10:]) if t[4]: text = t[4].strip() else: text = '-' @@ -1715,7 +1715,7 @@ if base_type in ['mysql','sqlite3']: if thread_type: import threading sema = threading.BoundedSemaphore(value=30) - try: threading.stack_size(32768) + try: threading.stack_size(65536) except ValueError: pass class KThread(threading.Thread): |