Commit 2a1d2933 authored by Jim Fulton's avatar Jim Fulton

Changed to use ZODB3 DB getSize method.

parent 14717654
......@@ -83,7 +83,7 @@
#
##############################################################################
__doc__="""System management components"""
__version__='$Revision: 1.52 $'[11:-2]
__version__='$Revision: 1.53 $'[11:-2]
import sys,os,time,string,Globals, Acquisition, os
......@@ -234,7 +234,11 @@ class ApplicationManager(Folder,CacheManager):
return db.getName()
def db_size(self):
s=os.stat(self.db_name())[6]
if Globals.DatabaseVersion=='2':
s=os.stat(self.db_name())[6]
else:
s=self._p_jar.db().getSize()
if s >= 1048576.0: return '%.1fM' % (s/1048576.0)
return '%.1fK' % (s/1024.0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment