mirror of
https://github.com/akuker/RASCSI.git
synced 2024-12-30 05:29:47 +00:00
Merge pull request #768 from philenotfound/master
In case all IDs are reserved recommend 0
This commit is contained in:
commit
94c98b4577
@ -32,7 +32,10 @@ def get_valid_scsi_ids(devices, reserved_ids):
|
||||
if unoccupied_ids:
|
||||
recommended_id = unoccupied_ids[-1]
|
||||
else:
|
||||
recommended_id = occupied_ids.pop(0)
|
||||
if occupied_ids:
|
||||
recommended_id = occupied_ids.pop(0)
|
||||
else:
|
||||
recommended_id = 0
|
||||
|
||||
return valid_ids, recommended_id
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user