Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def initialize(self):
self.root_folder = self.user_data_dir
self.cache_folder = os.path.join(self.root_folder, 'cache')
if not os.path.exists(self.cache_folder):
os.makedirs(self.cache_folder)
self.conn = Client()
self.conn.bind(on_error=lambda a,b: tprint(b))
self.com = Command(self.conn)
self.fwupd = FWUpd(self.conn)
self.fwget = FWGet(self.cache_folder)
self.versel = BooleanProperty(False)
self.hasextbms = BooleanProperty(False)
tprint("Don't forget to post a review on the Play Store")
def __init__(self):
self.register_event_type('on_error')
super(Client, self).__init__()
self.loop = None
Parameters
----------
ntbk : string | instance of NotebookNode
The input notebook.
max_output_lines : int | None
The maximum number of lines allowed in notebook outputs.
"""
if isinstance(ntbk, (str, type(Path))):
ntbk = Path(ntbk)
wd = str(ntbk.parent)
ntbk = str(ntbk)
else:
wd = str(Path())
ntbk = _check_nb_file(ntbk)
ntbk = execute(ntbk, cwd=wd)
return ntbk