Fixed a bug in the remote manager.
This commit is contained in:
@ -95,8 +95,17 @@ def validate_arguments(cliArgs):
|
|||||||
def run_fenrir():
|
def run_fenrir():
|
||||||
"""Main function that runs Fenrir"""
|
"""Main function that runs Fenrir"""
|
||||||
fenrirApp = fenrirManager.FenrirManager(cliArgs)
|
fenrirApp = fenrirManager.FenrirManager(cliArgs)
|
||||||
|
try:
|
||||||
fenrirApp.proceed()
|
fenrirApp.proceed()
|
||||||
|
finally:
|
||||||
del fenrirApp
|
del fenrirApp
|
||||||
|
# Clean up PID file if it exists
|
||||||
|
pidFile = "/run/fenrir.pid"
|
||||||
|
if os.path.exists(pidFile):
|
||||||
|
try:
|
||||||
|
os.remove(pidFile)
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
global cliArgs
|
global cliArgs
|
||||||
|
@ -30,15 +30,15 @@ class command():
|
|||||||
def run(self):
|
def run(self):
|
||||||
if not os.path.exists(self.script_path):
|
if not os.path.exists(self.script_path):
|
||||||
self.env['runtime']['OutputManager'].present_text(
|
self.env['runtime']['OutputManager'].present_text(
|
||||||
_('Script file not found'), sound_icon ='', interrupt=False)
|
_('Script file not found'), sound_icon='', interrupt=False)
|
||||||
return
|
return
|
||||||
if not os.path.isfile(self.script_path):
|
if not os.path.isfile(self.script_path):
|
||||||
self.env['runtime']['OutputManager'].present_text(
|
self.env['runtime']['OutputManager'].present_text(
|
||||||
_('Script source is not a valid file'), sound_icon ='', interrupt=False)
|
_('Script source is not a valid file'), sound_icon='', interrupt=False)
|
||||||
return
|
return
|
||||||
if not os.access(self.script_path, os.X_OK):
|
if not os.access(self.script_path, os.X_OK):
|
||||||
self.env['runtime']['OutputManager'].present_text(
|
self.env['runtime']['OutputManager'].present_text(
|
||||||
_('Script file is not executable'), sound_icon ='', interrupt=False)
|
_('Script file is not executable'), sound_icon='', interrupt=False)
|
||||||
return
|
return
|
||||||
_thread.start_new_thread(self._thread_run, ())
|
_thread.start_new_thread(self._thread_run, ())
|
||||||
|
|
||||||
@ -53,13 +53,13 @@ class command():
|
|||||||
self.env['runtime']['OutputManager'].interrupt_output()
|
self.env['runtime']['OutputManager'].interrupt_output()
|
||||||
if stderr != '':
|
if stderr != '':
|
||||||
self.env['runtime']['OutputManager'].present_text(
|
self.env['runtime']['OutputManager'].present_text(
|
||||||
str(stderr), sound_icon ='', interrupt=False)
|
str(stderr), sound_icon='', interrupt=False)
|
||||||
if stdout != '':
|
if stdout != '':
|
||||||
self.env['runtime']['OutputManager'].present_text(
|
self.env['runtime']['OutputManager'].present_text(
|
||||||
str(stdout), sound_icon ='', interrupt=False)
|
str(stdout), sound_icon='', interrupt=False)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.env['runtime']['OutputManager'].present_text(
|
self.env['runtime']['OutputManager'].present_text(
|
||||||
e, sound_icon ='', interrupt=False)
|
str(e), sound_icon='', interrupt=False)
|
||||||
|
|
||||||
def set_callback(self, callback):
|
def set_callback(self, callback):
|
||||||
pass
|
pass
|
||||||
|
@ -128,7 +128,7 @@ class FenrirManager():
|
|||||||
def handle_remote_incomming(self, event):
|
def handle_remote_incomming(self, event):
|
||||||
if not event['data']:
|
if not event['data']:
|
||||||
return
|
return
|
||||||
self.environment['runtime']['remoteManager'].handle_remote_incomming(
|
self.environment['runtime']['RemoteManager'].handle_remote_incomming(
|
||||||
event['data'])
|
event['data'])
|
||||||
|
|
||||||
def handle_screen_change(self, event):
|
def handle_screen_change(self, event):
|
||||||
|
@ -4,6 +4,6 @@
|
|||||||
# Fenrir TTY screen reader
|
# Fenrir TTY screen reader
|
||||||
# By Chrys, Storm Dragon, and contributers.
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
version = "2025.07.03"
|
version = "2025.07.05"
|
||||||
codeName = "testing"
|
codeName = "testing"
|
||||||
code_name = "testing"
|
code_name = "testing"
|
||||||
|
Reference in New Issue
Block a user