diff options
Diffstat (limited to 'scripts/lib/wic/plugins/imager/direct.py')
| -rw-r--r-- | scripts/lib/wic/plugins/imager/direct.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py index 51bdd3a984..5765bbb527 100644 --- a/scripts/lib/wic/plugins/imager/direct.py +++ b/scripts/lib/wic/plugins/imager/direct.py | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | 26 | ||
| 27 | import logging | 27 | import logging |
| 28 | import os | 28 | import os |
| 29 | import random | ||
| 29 | import shutil | 30 | import shutil |
| 30 | import tempfile | 31 | import tempfile |
| 31 | import uuid | 32 | import uuid |
| @@ -303,7 +304,7 @@ class PartitionedImage(): | |||
| 303 | # all partitions (in bytes) | 304 | # all partitions (in bytes) |
| 304 | self.ptable_format = ptable_format # Partition table format | 305 | self.ptable_format = ptable_format # Partition table format |
| 305 | # Disk system identifier | 306 | # Disk system identifier |
| 306 | self.identifier = int.from_bytes(os.urandom(4), 'little') or 0xffffffff | 307 | self.identifier = random.SystemRandom().randint(1, 0xffffffff) |
| 307 | 308 | ||
| 308 | self.partitions = partitions | 309 | self.partitions = partitions |
| 309 | self.partimages = [] | 310 | self.partimages = [] |
