Rev465, Display memory dump only in debug mode, Use sys.exit in trayicon, Optional files hashing, List function in SiteStorage, Test signing content, Test sign optional files, Test site storage

This commit is contained in:
HelloZeroNet 2015-09-28 22:07:26 +02:00
parent 39413b9755
commit a7d8d488da
9 changed files with 216 additions and 107 deletions

View file

@ -147,8 +147,13 @@ class UiRequestPlugin(object):
yield "<br></td></tr>"
yield "</table>"
# No more if not in debug mode
if not config.debug:
raise StopIteration
# Object types
obj_count = {}
for obj in gc.get_objects():
obj_type = str(type(obj))
@ -250,10 +255,17 @@ class UiRequestPlugin(object):
yield "Done in %.1f" % (time.time() - s)
def actionDumpobj(self):
import gc
import sys
self.sendHeader()
# No more if not in debug mode
if not config.debug:
yield "Not in debug mode"
raise StopIteration
class_filter = self.get.get("class")
yield """
@ -276,10 +288,17 @@ class UiRequestPlugin(object):
gc.collect() # Implicit grabage collection
def actionListobj(self):
import gc
import sys
self.sendHeader()
# No more if not in debug mode
if not config.debug:
yield "Not in debug mode"
raise StopIteration
type_filter = self.get.get("type")
yield """

View file

@ -63,9 +63,9 @@ class ActionsPlugin(object):
def quit(self):
self.icon.die()
time.sleep(0.1)
self.main.ui_server.stop()
self.main.file_server.stop()
# sys.exit()
sys.exit()
#self.main.ui_server.stop()
#self.main.file_server.stop()
def opensite(self, url):
import webbrowser