Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/alkorgun/blacksmith-2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Korgun <alkorgun@gmail.com>2013-12-07 00:44:05 +0400
committerAl Korgun <alkorgun@gmail.com>2013-12-07 00:44:05 +0400
commite181f10a5a7374197e658fbe935febc29d4ca855 (patch)
tree1356a57a024b3f561610dc51cc641bb453b9ba38
parent89b59b77a8740d5ef8bef3e3b8f4b20efb1487a0 (diff)
some fixes in xmpp-library; fix of user_stats
-rw-r--r--BlackSmith.py14
-rw-r--r--expansions/user_stats/code.py3
-rw-r--r--libs.zip (renamed from librarys.zip)bin101096 -> 101104 bytes
3 files changed, 9 insertions, 8 deletions
diff --git a/BlackSmith.py b/BlackSmith.py
index 3e865c9..593500b 100644
--- a/BlackSmith.py
+++ b/BlackSmith.py
@@ -23,8 +23,8 @@ if BsCore:
os.chdir(BsRoot)
else:
BsRoot = os.getcwd()
-ZipLib = "librarys.zip"
-sys.path.insert(0, ZipLib)
+LibDir = "libs.zip"
+sys.path.insert(0, LibDir)
from enconf import *
@@ -175,14 +175,16 @@ def check_sqlite():
def exc_info():
exc, err, tb = sys.exc_info()
- if exc and err:
+ try:
exc, err = exc.__name__, err[0]
- return (exc, err)
+ except Exception:
+ exc, err = str(exc), str(err)
+ return exc, err
def exc_info_(fp = None):
try:
exc_info__(None, fp)
- except:
+ except Exception:
pass
sleep, database = time.sleep, itypes.Database
@@ -190,7 +192,7 @@ sleep, database = time.sleep, itypes.Database
def get_exc():
try:
exc = ithr.get_exc()
- except:
+ except Exception:
exc = "(...)"
return exc
diff --git a/expansions/user_stats/code.py b/expansions/user_stats/code.py
index 97d389a..82a6239 100644
--- a/expansions/user_stats/code.py
+++ b/expansions/user_stats/code.py
@@ -75,7 +75,6 @@ class expansion_temp(expansion):
if nick != get_nick(conf):
source_ = get_source(conf, nick)
if source_:
- sbody = str(sbody)
if scode == sCodes[0]:
sbody = "banned:(%s)" % (sbody)
elif scode == sCodes[2]:
@@ -85,7 +84,7 @@ class expansion_temp(expansion):
db("select * from stat where jid=?", (source_,))
db_desc = db.fetchone()
if db_desc:
- db("update stat set seen=?, leave=? where jid=?", (date, sbody, source_))
+ db("update stat set seen=?, leave=? where jid=?", (date, unicode(sbody), source_))
db.commit()
def calc_stat_06eh(self, conf, old_nick, nick, disp):
diff --git a/librarys.zip b/libs.zip
index 1ebb194..c54f7f5 100644
--- a/librarys.zip
+++ b/libs.zip
Binary files differ