Skip to content

Commit

Permalink
Format guiunstable.py and rename requirements.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
justaCasualCoder committed Dec 23, 2023
1 parent 24bc086 commit 90f271a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions guiunstable.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def start_process(self, partition, image):
self.p.stateChanged.connect(self.handle_state)
self.p.finished.connect(self.process_finished) # Clean up once complete.
heimdallbin = os.path.abspath(os.path.join(cwd, "heimdall/heimdall_linux"))
if os.name == 'nt':
if os.name == "nt":
print("Running on Windows!")
print("Running heimdall.exe")
heimdallbin = "./heimdall/heimdall.exe"
Expand Down Expand Up @@ -247,7 +247,9 @@ def fetch_devices(self):
code = element["href"].split("/")[-1].split(".")[0]

# Extract all content within parentheses
parentheses_content = [content.strip() for content in device_name.split("(")[1:]]
parentheses_content = [
content.strip() for content in device_name.split("(")[1:]
]

# Use the second set of parentheses if it exists; otherwise, use the first set of parentheses
if len(parentheses_content) >= 2:
Expand All @@ -261,8 +263,9 @@ def fetch_devices(self):
# Add the device name and customized code to the dictionary
devices[device_name] = code
self.devices = devices
self.entry.addItems(list(self.devices.keys()))
self.entry.addItems(list(self.devices.keys()))
return devices

def download_flash(self):
# Huge thanks to the orginal creator - JBBgameich
# https://github.com/JBBgameich/halium-install
Expand Down Expand Up @@ -302,7 +305,7 @@ def __init__(self):
self.get_device_button = QPushButton("Fetch Devices")
self.get_device_button.clicked.connect(self.fetch_devices)
self.entry = QComboBox()
# self.entry.addItems(list(self.devices.keys()))
# self.entry.addItems(list(self.devices.keys()))
self.entry.currentIndexChanged.connect(self.device_selected)
info1 = QLabel("Device")
button = QPushButton("Download / Flash")
Expand All @@ -327,7 +330,6 @@ def device_selected(self, index):
else:
print(f"Code not found for {selected_device}")
self.current_code = selected_device_code



if __name__ == "__main__":
Expand Down
File renamed without changes.

0 comments on commit 90f271a

Please sign in to comment.