diff --git a/createhdds.py b/createhdds.py index 5c9290b..c727ffc 100755 --- a/createhdds.py +++ b/createhdds.py @@ -43,6 +43,11 @@ from six.moves.urllib.request import urlopen # directory. SCRIPTDIR = os.path.abspath(os.path.dirname(sys.argv[0])) CPUARCH = platform.processor() +# Some processors or platforms return an empty string in +# previous step and the script then ends with an error +# saying "Won't create X image on host." +# If that happens, let's read the value from the +# platform.machine() instead. if not CPUARCH: CPUARCH = platform.machine() logger = logging.getLogger('createhdds') @@ -157,7 +162,7 @@ class GuestfsImage(object): gpt_type = part.get("gpt_type", None) if gpt_type: gfs.part_set_gpt_type(disk, partnum, gpt_type) - # format the partition + # format the partition gfs.mkfs(part['filesystem'], partname, label=part.get('label')) # do file 'writes' (create a file with a given string as # its content) @@ -308,7 +313,7 @@ class VirtInstallImage(object): # build Workstation images out of Everything if variant == 'Workstation': variant = 'Everything' - + try: # this is almost complex enough to need fedfind but not # quite, I think. also fedfind can't find the 'transient'