[1/4] pygrub: fix message in grub parser
diff mbox series

Message ID 20190401103238.15649-2-wei.liu2@citrix.com
State New, archived
Headers show
Series
  • More python fixes
Related show

Commit Message

Wei Liu April 1, 2019, 10:32 a.m. UTC
The code suggests 0 is allowed. Zero is not a positive number.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
Backport candadiate.
---
 tools/pygrub/src/GrubConf.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andrew Cooper April 1, 2019, 4:16 p.m. UTC | #1
On 01/04/2019 11:32, Wei Liu wrote:
> The code suggests 0 is allowed. Zero is not a positive number.
>
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>

I suspect you are opening a can of number theory worms with that commit
message, but the overall change is an improvement.

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>

Patch
diff mbox series

diff --git a/tools/pygrub/src/GrubConf.py b/tools/pygrub/src/GrubConf.py
index f8d3799dc0..0204d410ac 100644
--- a/tools/pygrub/src/GrubConf.py
+++ b/tools/pygrub/src/GrubConf.py
@@ -236,7 +236,7 @@  class _GrubConfigFile(object):
             self._default = val
 
         if self._default < 0:
-            raise ValueError("default must be positive number")
+            raise ValueError("default must be non-negative number")
     default = property(_get_default, _set_default)
 
     def set_splash(self, val):