Skip to content

Commit

Permalink
Fix code style issues with Black
Browse files Browse the repository at this point in the history
  • Loading branch information
weee-open-bot committed Oct 16, 2024
1 parent 63a1378 commit 252261e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions basilico.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,19 +678,19 @@ def umount(self, _cmd: str, dev: str):

def _umount_internal(self, dev):
try:
result = subprocess.run(['lsblk', '-J', dev], capture_output=True, text=True)
result = subprocess.run(["lsblk", "-J", dev], capture_output=True, text=True)

if result.returncode != 0:
return False

lsblk_output = json.loads(result.stdout)

partitions_to_unmount = []
blockdevices = lsblk_output.get('blockdevices', [])
blockdevices = lsblk_output.get("blockdevices", [])
for device in blockdevices:
if 'children' in device:
for partition in device['children']:
if 'mountpoints' in partition and len(partition['mountpoints']) > 0:
if "children" in device:
for partition in device["children"]:
if "mountpoints" in partition and len(partition["mountpoints"]) > 0:
partitions_to_unmount.append(f"/dev/{partition['name']}")
break

Expand Down
4 changes: 2 additions & 2 deletions pinolo.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,8 @@ def queue_info(self):
def umount_disk(self):
dialog = warning_dialog(
"Are you really sure you want to umount this disk?\nThis is generally not a good idea, proceed only if you are really sure of what are you doing.",
"yes_no"
)
"yes_no",
)

if dialog == QMessageBox.Yes:
drives = self.get_multiple_drive_selection()
Expand Down

0 comments on commit 252261e

Please sign in to comment.