git://git.onelab.eu
/
monitor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
www/database.php
[monitor.git]
/
database.py
diff --git
a/database.py
b/database.py
index
14fc0e3
..
1173d8a
100644
(file)
--- a/
database.py
+++ b/
database.py
@@
-3,23
+3,20
@@
import sys
import pickle
noserial=False
try:
import pickle
noserial=False
try:
- from PHPSerialize import *
- from PHPUnserialize import *
+ from
util.
PHPSerialize import *
+ from
util.
PHPUnserialize import *
except:
#print >>sys.stderr, "PHPSerial db type not allowed."
noserial=True
import inspect
import shutil
except:
#print >>sys.stderr, "PHPSerial db type not allowed."
noserial=True
import inspect
import shutil
-from config import config as cfg
-config = cfg()
-
-import monitorconfig
+import config
+import config as monitorconfig
DEBUG= 0
PICKLE_PATH=monitorconfig.MONITOR_DATA_ROOT
DEBUG= 0
PICKLE_PATH=monitorconfig.MONITOR_DATA_ROOT
-class ExceptionTimeout(Exception): pass
def dbLoad(name, type=None):
return SPickle().load(name, type)
def dbLoad(name, type=None):
return SPickle().load(name, type)
@@
-114,7
+111,10
@@
class SPickle:
raise Exception, "No such file %s" % name
raise Exception, "No such file %s" % name
+ #import traceback
+ #print traceback.print_stack()
#print "loading %s" % self.__file(name, type)
#print "loading %s" % self.__file(name, type)
+ #sys.stderr.write("-----------------------------\n")
f = open(self.__file(name, type), 'r')
if type == None:
o = pickle.load(f)
f = open(self.__file(name, type), 'r')
if type == None:
o = pickle.load(f)