1
0
Fork 0

Fix escape sequences in wasptool

Signed-off-by: Andreas Kloeckner <inform@tiker.net>
This commit is contained in:
Andreas Kloeckner 2021-06-23 13:24:43 -05:00 committed by Daniel Thompson
parent 04e35d437e
commit bbadbd34c7

View file

@ -228,7 +228,7 @@ def handle_rtc(c):
def check_rtc(c):
c.sendline('print(watch.rtc.get_localtime())')
c.expect('\(([0-9]+), ([0-9]+), ([0-9]+), ([0-9]+), ([0-9]+), ([0-9]+), ([0-9]+), ([0-9]+)\)')
c.expect(r'\(([0-9]+), ([0-9]+), ([0-9]+), ([0-9]+), ([0-9]+), ([0-9]+), ([0-9]+), ([0-9]+)\)')
t = time.localtime()
watch_hms = (int(c.match[4]), int(c.match[5]), int(c.match[6]))
@ -390,7 +390,7 @@ if __name__ == '__main__':
console.logfile = io.StringIO()
try:
console.expect('Connect.*\(([0-9A-F:]*)\)')
console.expect(r'Connect.*\(([0-9A-F:]*)\)')
except pexpect.exceptions.TIMEOUT:
print('ERROR: Cannot find suitable wasp-os device')
if not args.verbose: