File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
import argparse
2
+ import ast
2
3
import os
3
4
import re
4
5
from typing import Dict , Optional
@@ -179,12 +180,12 @@ def read_meta_dict(self):
179
180
for meta_dict_file in dict_files_list :
180
181
dictionary_file_name = os .path .join ("dict" , meta_dict_file )
181
182
with open (os .path .join (self .current_dir , dictionary_file_name ), "r" ) as dictionary_file :
182
- data = dictionary_file .read ()
183
+ data = dictionary_file .read (). strip ()
183
184
184
185
if not data :
185
186
continue
186
187
187
- meta_dict_data = eval (data )
188
+ meta_dict_data = ast . literal_eval (data )
188
189
189
190
if not meta_dict_data :
190
191
continue
Original file line number Diff line number Diff line change 21
21
from pg_anon .version import __version__
22
22
23
23
24
- async def run_pg_anon (cli_run_params : Optional [List [str ]] = None ) -> None :
24
+ async def run_pg_anon (cli_run_params : Optional [List [str ]] = None ) -> PgAnonResult :
25
25
"""
26
26
Run pg_anon
27
27
:param cli_run_params: list of params in command line format
@@ -33,6 +33,8 @@ async def run_pg_anon(cli_run_params: Optional[List[str]] = None) -> None:
33
33
if result .result_code == ResultCode .FAIL :
34
34
sys .exit (1 )
35
35
36
+ return result
37
+
36
38
37
39
class MainRoutine :
38
40
You can’t perform that action at this time.
0 commit comments