Fix quickaccess token passing

This commit is contained in:
Bernd Schoolmann 2024-05-03 20:52:16 +02:00
parent a1ab7b0069
commit 8a8a2c10a6
No known key found for this signature in database
2 changed files with 3 additions and 4 deletions

View File

@ -101,7 +101,6 @@ class GoldwardenQuickAccessApp(Adw.Application):
def update_logins(self): def update_logins(self):
logins = goldwarden.get_vault_logins() logins = goldwarden.get_vault_logins()
print(logins)
if logins == None: if logins == None:
os._exit(0) os._exit(0)
return return
@ -109,9 +108,7 @@ class GoldwardenQuickAccessApp(Adw.Application):
self.update() self.update()
if __name__ == "__main__": if __name__ == "__main__":
# todo add proper method to debug this token = sys.stdin.readline()
# token = sys.stdin.readline()
token = "Test"
goldwarden.create_authenticated_connection(token) goldwarden.create_authenticated_connection(token)
app = GoldwardenQuickAccessApp(application_id="com.quexten.Goldwarden.quickaccess") app = GoldwardenQuickAccessApp(application_id="com.quexten.Goldwarden.quickaccess")
app.run(sys.argv) app.run(sys.argv)

View File

@ -19,6 +19,8 @@ def run_window(name, token):
p = subprocess.Popen(["python3", "-m", "src.gui." + name], stdin=subprocess.PIPE, stdout=subprocess.PIPE, cwd=cwd, start_new_session=True) p = subprocess.Popen(["python3", "-m", "src.gui." + name], stdin=subprocess.PIPE, stdout=subprocess.PIPE, cwd=cwd, start_new_session=True)
p.stdin.write(f"{token}\n".encode()) p.stdin.write(f"{token}\n".encode())
p.stdin.flush() p.stdin.flush()
class GoldwardenSettingsApp(Adw.Application): class GoldwardenSettingsApp(Adw.Application):
def __init__(self, **kwargs): def __init__(self, **kwargs):
super().__init__(**kwargs) super().__init__(**kwargs)