Small fixes in doc + missing app_gui.stop on error

This commit is contained in:
2016-01-03 11:27:40 +05:30
parent c446797d83
commit 1e8203a92d
2 changed files with 5 additions and 1 deletions
+2 -1
View File
@@ -59,7 +59,8 @@ class Controller(htmlPy.Object):
hash_dir_name = redis_db.hget("directories_to_hash", dir_name) hash_dir_name = redis_db.hget("directories_to_hash", dir_name)
if hash_dir_name is None: if hash_dir_name is None:
raise Exception("dir_name = {dir_name} not found in redis db".format( self.app_gui.stop()
raise redis.exceptions.ConnectionError("dir_name = {dir_name} not found in redis db".format(
dir_name=dir_name)) dir_name=dir_name))
dict_state = {} dict_state = {}
+3
View File
@@ -43,6 +43,9 @@ def reload_2_3(module_name):
reload that works in all versions of Python. reload that works in all versions of Python.
Uses builtin reload in py2, imp.reload for <=py3.3, Uses builtin reload in py2, imp.reload for <=py3.3,
importlib.reload for >=3.4 importlib.reload for >=3.4
The module six has similar functionalities,
but would be too huge a dependency for this simple case.
''' '''
from sys import version_info from sys import version_info