complete VCSU support
This commit is contained in:
@ -11,23 +11,23 @@ def getPrevLine(currX,currY, currText):
|
||||
endOfScreen = False
|
||||
if currText == '':
|
||||
return -1, -1, '', endOfScreen
|
||||
wrappedLines = currText.split('\n')
|
||||
wrappedLines = currText.split('\n')
|
||||
x = currX
|
||||
y = currY
|
||||
if y - 1 >= 0:
|
||||
y -= 1
|
||||
else:
|
||||
endOfScreen = True
|
||||
endOfScreen = True
|
||||
x = 0
|
||||
currLine = ''
|
||||
if not endOfScreen:
|
||||
currLine = wrappedLines[y]
|
||||
currLine = wrappedLines[y]
|
||||
return x, y, currLine, endOfScreen
|
||||
|
||||
def getCurrentLine(currX,currY, currText):
|
||||
if currText == '':
|
||||
return -1, -1, ''
|
||||
wrappedLines = currText.split('\n')
|
||||
wrappedLines = currText.split('\n')
|
||||
x = currX
|
||||
y = currY
|
||||
x = 0
|
||||
@ -38,7 +38,7 @@ def getNextLine(currX,currY, currText):
|
||||
endOfScreen = False
|
||||
if currText == '':
|
||||
return -1, -1, '', endOfScreen
|
||||
wrappedLines = currText.split('\n')
|
||||
wrappedLines = currText.split('\n')
|
||||
x = currX
|
||||
y = currY
|
||||
if y + 1 < len(wrappedLines):
|
||||
|
@ -32,7 +32,7 @@ def createScreenEventData(content):
|
||||
'screen': content['screen'],
|
||||
'text': content['text'],
|
||||
'attributes': content['attributes'],
|
||||
'screenUpdateTime': time.time(),
|
||||
'screenUpdateTime': time.time(),
|
||||
}
|
||||
return eventData.copy()
|
||||
|
||||
@ -65,7 +65,7 @@ def isValidShell(shell = ''):
|
||||
def getShell():
|
||||
try:
|
||||
shell = os.environ["FENRIRSHELL"]
|
||||
if isValidShell(shell):
|
||||
if isValidShell(shell):
|
||||
return shell
|
||||
except:
|
||||
pass
|
||||
@ -83,7 +83,7 @@ def getShell():
|
||||
(username, encrypwd, uid, gid, gecos, homedir, shell) = user.split(':')
|
||||
shell = shell.replace('\n','')
|
||||
if username == getpass.getuser():
|
||||
if isValidShell(shell):
|
||||
if isValidShell(shell):
|
||||
return shell
|
||||
except:
|
||||
pass
|
||||
|
Reference in New Issue
Block a user