← Back to team overview

curtin-dev team mailing list archive

[Merge] ~alexsander-souza/curtin:lp2054672 into curtin:master

 

Alexsander de Souza has proposed merging ~alexsander-souza/curtin:lp2054672 into curtin:master.

Commit message:
raise exception on bcache validation errors

returning the exception is probably a typo

Requested reviews:
  curtin developers (curtin-dev)

For more details, see:
https://code.launchpad.net/~alexsander-souza/curtin/+git/curtin/+merge/461160
-- 
Your team curtin developers is requested to review the proposed merge of ~alexsander-souza/curtin:lp2054672 into curtin:master.
diff --git a/curtin/block/bcache.py b/curtin/block/bcache.py
index c1a8d26..f92c29b 100644
--- a/curtin/block/bcache.py
+++ b/curtin/block/bcache.py
@@ -369,14 +369,14 @@ def validate_bcache_ready(bcache_device, bcache_sys_path):
                 raise OSError(msg)
         else:
             msg = 'didnt find "dev" attribute on: %s', bcache_dev
-            return OSError(msg)
+            raise OSError(msg)
 
     else:
         LOG.debug("Failed to validate bcache device '%s' from sys_path"
                   " '%s'", bcache_device, bcache_sys_path)
         msg = ('sysfs path %s does not appear to be a bcache device' %
                bcache_sys_path)
-        return ValueError(msg)
+        raise ValueError(msg)
 
 
 def ensure_bcache_is_registered(bcache_device, expected, retry=None):

Follow ups