diff --git a/bootstrapvz/common/fs/qemuvolume.py b/bootstrapvz/common/fs/qemuvolume.py index b8c09d7..6783ec1 100644 --- a/bootstrapvz/common/fs/qemuvolume.py +++ b/bootstrapvz/common/fs/qemuvolume.py @@ -62,8 +62,8 @@ class QEMUVolume(LoopbackVolume): def _module_param(self, module, param): import os.path param_path = os.path.join('/sys/module', module, 'parameters', param) - with open(param_path) as param: - return param.read().strip() + with open(param_path) as param_file: + return param_file.read().strip() # From http://lists.gnu.org/archive/html/qemu-devel/2011-11/msg02201.html # Apparently it's not in the current qemu-nbd shipped with wheezy diff --git a/tests/__init__.py b/tests/__init__.py index cd41a18..b0fd5e2 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -4,6 +4,6 @@ def recursive_glob(path, pattern): import fnmatch import os - for path, dirnames, filenames in os.walk(path): + for root, dirnames, filenames in os.walk(path): for filename in fnmatch.filter(filenames, pattern): - yield os.path.join(path, filename) + yield os.path.join(root, filename)