Commit 00e5f8f3 authored by Anton Pershin's avatar Anton Pershin

Fixed numerous bugs due to the introduction of transfer functions, selectors etc.

parent dc6980a9
...@@ -202,12 +202,6 @@ def create_file_mkdir(filepath): ...@@ -202,12 +202,6 @@ def create_file_mkdir(filepath):
os.makedirs(dirpath) os.makedirs(dirpath)
return open(filepath, 'w') return open(filepath, 'w')
def get_templates_path():
'''
Returns the absolute path to templates directory. It is useful when the module is imported from elsewhere.
'''
return os.path.join(os.path.dirname(os.path.dirname(__file__)), 'templates')
def merge_dicts(*dict_args): def merge_dicts(*dict_args):
''' '''
Given any number of dicts, shallow copy and merge into a new dict, Given any number of dicts, shallow copy and merge into a new dict,
...@@ -454,3 +448,8 @@ def load_from_json(cls: Type[JsonSerializable], path_to_jsons: str = 'jsons') -> ...@@ -454,3 +448,8 @@ def load_from_json(cls: Type[JsonSerializable], path_to_jsons: str = 'jsons') ->
with open(filename, 'r') as f: with open(filename, 'r') as f:
obj_as_dict = json.load(f) obj_as_dict = json.load(f)
return cls.from_json(obj_as_dict) return cls.from_json(obj_as_dict)
def print_msg_if_allowed(msg, allow=False):
if allow:
print(msg)
This diff is collapsed.
This diff is collapsed.
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