-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Firefox is still not working correctly and I've currently just commented out the assertion in firefox.py
- Loading branch information
Showing
12 changed files
with
69 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
extension-pkg-whitelist=PyQt5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
{ | ||
"python.linting.pylintEnabled": true, | ||
"python.linting.enabled": true | ||
"python.linting.enabled": true, | ||
"[python]": { | ||
"editor.defaultFormatter": "ms-python.black-formatter" | ||
}, | ||
"python.formatting.provider": "none" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/bin/sh | ||
python3 /app/__main__.py | ||
python3 -m yin_yang |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,43 @@ | ||
import subprocess | ||
|
||
# This is a helper method which will change how we check output depending on if | ||
# The application is running in a flatpak or not. | ||
|
||
"""Check output of a command. | ||
This is a helper method which will change how we check output depending on if | ||
The application is running in a flatpak or not. | ||
""" | ||
|
||
|
||
def check_output(args, universal_newlines=False) -> bytes: | ||
try: | ||
return subprocess.check_output(args, universal_newlines) | ||
except FileNotFoundError: | ||
flatpak_args = ['flatpak-spawn', '--host'] + args | ||
return subprocess.check_output(flatpak_args, universal_newlines) | ||
try: | ||
output = subprocess.check_output( | ||
args=args, universal_newlines=universal_newlines | ||
) | ||
return output | ||
except FileNotFoundError: | ||
flatpak_args = ["flatpak-spawn", "--host"] + args | ||
return subprocess.check_output( | ||
args=flatpak_args, universal_newlines=universal_newlines | ||
) | ||
|
||
|
||
def check_call(command, stdout=None) -> int: | ||
try: | ||
return subprocess.check_call(command, stdout=stdout) | ||
except FileNotFoundError: | ||
flatpak_args = ["flatpak-spawn", "--host"] + command | ||
return subprocess.check_call(flatpak_args, stdout=stdout) | ||
|
||
|
||
def run(command: list[str], kwargs: list[str] = []) -> subprocess.CompletedProcess[str]: | ||
try: | ||
if len(kwargs) == 0: | ||
return subprocess.run(command) | ||
else: | ||
return subprocess.run(command, **kwargs) | ||
except FileNotFoundError: | ||
flatpak_args = ["flatpak-spawn", "--host"] + command | ||
if len(kwargs) == 0: | ||
return subprocess.run(flatpak_args) | ||
else: | ||
return subprocess.run(flatpak_args, **kwargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
import subprocess | ||
import re | ||
from yin_yang import helpers | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
import json | ||
import logging | ||
import subprocess | ||
import pwd | ||
import os | ||
from configparser import ConfigParser | ||
|