[PATCH] Switch error exit codes to 1

Martin Kolman mkolman at redhat.com
Thu Jun 26 14:39:23 UTC 2014


On Thu, 2014-06-26 at 07:38 -0700, Brian C. Lane wrote:
> There were several error exits that were still returning 0.
> ---
>  anaconda | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/anaconda b/anaconda
> index 243ee2b..432d2ab 100755
> --- a/anaconda
> +++ b/anaconda
> @@ -788,7 +788,7 @@ if __name__ == "__main__":
>  
>      if os.geteuid() != 0:
>          stdoutLog.error("anaconda must be run as root.")
> -        sys.exit(0)
> +        sys.exit(1)
>  
>      # see if we're on s390x and if we've got an ssh connection
>      uname = os.uname()
> @@ -820,7 +820,7 @@ if __name__ == "__main__":
>  
>      if opts.images and opts.dirinstall:
>          stdoutLog.error("--images and --dirinstall cannot be used at the same time")
> -        sys.exit(0)
> +        sys.exit(1)
>      elif opts.images:
>          flags.imageInstall = True
>      elif opts.dirinstall:
> @@ -1127,7 +1127,7 @@ if __name__ == "__main__":
>              flags.imageInstall = True
>      except ValueError as e:
>          stdoutLog.error("error specifying image file: %s", e)
> -        sys.exit(0)
> +        sys.exit(1)
>  
>      if image_count:
>          anaconda.storage.setupDiskImages()
Looks good, ACK!



More information about the anaconda-patches mailing list