def error_handler(self, task_id, error_msg, state, traceback=None): ''' Handler for a failed task. Parameters ---------- task_id : str UUID of task. error_msg : str Error message. state : See `state` module State of the task. traceback : str The traceback if error occurred. ''' # progress view does not print a newline, so do it here sys.stdout.write("\n") # log error msg log.error(str(error_msg)) # print traceback if available if traceback: log.error(traceback)
def error_handler(self, task_id, error_msg, state, traceback = None): ''' Handler for a failed task. Parameters ---------- task_id : str UUID of task. error_msg : str Error message. state : See `state` module State of the task. traceback : str The traceback if error occurred. ''' # progress view does not print a newline, so do it here sys.stdout.write("\n") # log error msg log.error(str(error_msg)) # print traceback if available if traceback: log.error(traceback)
__all__ = [] __author__ = u"Nils Tobias Schmidt, Lars Baumgärtner" __copyright__ = PROJECT_COPYRIGHT __license__ = PROJECT_LICENSE __version__ = PROJECT_VERSION __email__ = "{schmidt89,lbaumgaertner}@informatik.uni-marburg.de" try: # load androguard Util.set_androguard_path(settings.singleton) # import namespace of androguards androlyze.py module imp.load_source("androlyze", "%s/androlyze.py" % settings.singleton[(SECTION_ANDROGUARD, KEY_ANDROGUARD_PATH)]) from androlyze import * except Exception as e: log.error(e) ############################################################ #---Import ############################################################ def action_import_apks(storage, apk_paths, copy_apk = False, copy_to_mongodb = False, update = False, tag = None, # shared memory cnt_imported_apks = None, total_apk_count = None, import_finished = None, # concurrent settings concurrency = None ): ''' Import the apks from the `apk_paths` and create the file system structure