Make sure all except statements are no longer empty, should help a lot with debugging.
This commit is contained in:
@ -117,7 +117,8 @@ def getPhonetic(currChar):
|
||||
if currChar.isupper():
|
||||
phonChar = phonChar[0].upper() + phonChar[1:]
|
||||
return phonChar
|
||||
except:
|
||||
except Exception as e:
|
||||
# Utility function, no env access - return fallback
|
||||
return currChar
|
||||
|
||||
def presentCharForReview(env, char, interrupt=True, announceCapital=True, flush=False):
|
||||
|
@ -58,8 +58,10 @@ def isValidShell(shell = ''):
|
||||
return False
|
||||
if not os.access(shell,os.X_OK):
|
||||
return False
|
||||
except:
|
||||
return False
|
||||
except Exception as e:
|
||||
# Utility function, no env access - use fallback logging
|
||||
print(f'screen_utils isValidShell: Error checking shell {shell}: {e}')
|
||||
return False
|
||||
return True
|
||||
|
||||
def getShell():
|
||||
@ -67,13 +69,15 @@ def getShell():
|
||||
shell = os.environ["FENRIRSHELL"]
|
||||
if isValidShell(shell):
|
||||
return shell
|
||||
except:
|
||||
except Exception as e:
|
||||
# Utility function, no env access - continue silently
|
||||
pass
|
||||
try:
|
||||
shell = os.environ["SHELL"]
|
||||
if isValidShell(shell):
|
||||
return shell
|
||||
except:
|
||||
except Exception as e:
|
||||
# Utility function, no env access - continue silently
|
||||
pass
|
||||
try:
|
||||
if os.access('/etc/passwd', os.R_OK):
|
||||
@ -85,7 +89,8 @@ def getShell():
|
||||
if username == getpass.getuser():
|
||||
if isValidShell(shell):
|
||||
return shell
|
||||
except:
|
||||
except Exception as e:
|
||||
# Utility function, no env access - continue silently
|
||||
pass
|
||||
if isValidShell('/bin/bash'):
|
||||
return '/bin/bash'
|
||||
|
Reference in New Issue
Block a user