mirror of
https://github.com/akuker/RASCSI.git
synced 2025-01-15 04:30:24 +00:00
Merge branch 'develop' into uweseimet_develop
This commit is contained in:
commit
0c7d185eb8
@ -64,14 +64,12 @@ def get_type(scsi_id):
|
|||||||
return list_devices()[int(scsi_id)]["type"]
|
return list_devices()[int(scsi_id)]["type"]
|
||||||
|
|
||||||
|
|
||||||
def attach_image(scsi_id, image, device_type):
|
def attach_image(scsi_id, image, image_type):
|
||||||
if device_type == "SCCD" and get_type(scsi_id) == "SCCD":
|
if image_type == "SCCD" and get_type(scsi_id) == "SCCD":
|
||||||
return insert(scsi_id, image)
|
return insert(scsi_id, image)
|
||||||
elif device_type == "SCDP":
|
|
||||||
attach_daynaport(scsi_id)
|
|
||||||
else:
|
else:
|
||||||
return subprocess.run(
|
return subprocess.run(
|
||||||
["rasctl", "-c", "attach", "-t", device_type, "-i", scsi_id, "-f", image],
|
["rasctl", "-c", "attach", "-t", image_type, "-i", scsi_id, "-f", image],
|
||||||
capture_output=True,
|
capture_output=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -137,9 +137,9 @@ def attach():
|
|||||||
print("valid_file_types: ", valid_file_types)
|
print("valid_file_types: ", valid_file_types)
|
||||||
if re.match(valid_file_types, file_name):
|
if re.match(valid_file_types, file_name):
|
||||||
if file_name.lower().endswith((".iso", ".cdr", ".toast", ".img")):
|
if file_name.lower().endswith((".iso", ".cdr", ".toast", ".img")):
|
||||||
image_type = "cd"
|
image_type = "SCCD"
|
||||||
else:
|
else:
|
||||||
image_type = "hd"
|
image_type = "SCHD"
|
||||||
else:
|
else:
|
||||||
flash(f"Unknown file type. Valid files are: {', '.join(valid_file_suffix)}", "error")
|
flash(f"Unknown file type. Valid files are: {', '.join(valid_file_suffix)}", "error")
|
||||||
return redirect(url_for("index"))
|
return redirect(url_for("index"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user