diff --git a/src/modules/dummypython/main.py b/src/modules/dummypython/main.py index c173c294d..e0153b881 100644 --- a/src/modules/dummypython/main.py +++ b/src/modules/dummypython/main.py @@ -41,5 +41,4 @@ def run(): + str( libcalamares.globalStorage.value( "item3" ) ) + "\n" libcalamares.job.setprogress( 0.1 ) - return accumulator - + return ( "", accumulator ) diff --git a/src/modules/grub/main.py b/src/modules/grub/main.py index d735f0681..affbc8bea 100644 --- a/src/modules/grub/main.py +++ b/src/modules/grub/main.py @@ -77,4 +77,4 @@ def run(): installGrub( rootMountPoint, bootLoader ) finally: umountPartitions( rootMountPoint, extraMounts ) - return "All done" + return None diff --git a/src/modules/mount/main.py b/src/modules/mount/main.py index 8fc928f5b..783b69bde 100644 --- a/src/modules/mount/main.py +++ b/src/modules/mount/main.py @@ -61,4 +61,4 @@ def run(): mountPartitions( rootMountPoint, libcalamares.globalStorage.value( "partitions" ) ) libcalamares.globalStorage.insert( "rootMountPoint", rootMountPoint ) - return "All done, mounted at {}".format( rootMountPoint ) + return None diff --git a/src/modules/umount/main.py b/src/modules/umount/main.py index 5817a95b5..34b7349db 100644 --- a/src/modules/umount/main.py +++ b/src/modules/umount/main.py @@ -35,9 +35,9 @@ def listMounts( rootMountPoint ): def run(): rootMountPoint = libcalamares.globalStorage.value( "rootMountPoint" ) if not rootMountPoint: - return "GlobalStorage does not contain a \"rootMountPoint\" key, doing nothing" + return ( "No mount point for root partition in GlobalStorage", "GlobalStorage does not contain a \"rootMountPoint\" key, doing nothing" ) if not os.path.exists( rootMountPoint ): - return "GlobalStorage[\"rootMountPoint\"] is \"{}\", which does not exist, doing nothing".format( rootMountPoint ) + return ( "Bad mount point for root partition in GlobalStorage", "GlobalStorage[\"rootMountPoint\"] is \"{}\", which does not exist, doing nothing".format( rootMountPoint ) ) lst = listMounts( rootMountPoint ) # Sort the list by mount point in decreasing order. This way we can be sure @@ -48,4 +48,4 @@ def run(): subprocess.check_call( [ "umount", mountPoint ] ) os.rmdir( rootMountPoint ) - return "All done" + return None diff --git a/src/modules/unsquashfs/main.py b/src/modules/unsquashfs/main.py index 8585baf2d..fc9416cae 100644 --- a/src/modules/unsquashfs/main.py +++ b/src/modules/unsquashfs/main.py @@ -106,7 +106,12 @@ def run(): # destination: "" rootMountPoint = globalStorage.value( "rootMountPoint" ) - + if not rootMountPoint: + return ( "No mount point for root partition in GlobalStorage", + "GlobalStorage does not contain a \"rootMountPoint\" key, doing nothing" ) + if not os.path.exists( rootMountPoint ): + return ( "Bad mount point for root partition in GlobalStorage", + "GlobalStorage[\"rootMountPoint\"] is \"{}\", which does not exist, doing nothing".format( rootMountPoint ) ) unpack = list() for entry in job.configuration[ "unpack" ]: @@ -114,7 +119,8 @@ def run(): destination = os.path.abspath( os.path.join( rootMountPoint, entry[ "destination" ] ) ) if not os.path.isfile( source ) or not os.path.isdir( destination ): - return "Error: bad source or destination" + return ( "Bad source or destination", + "source=\"{}\"\ndestination=\"{}\"".format( source, destination ) ) unpack.append( UnpackEntry( source, destination ) )