Commit fe584cc4 authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

Do not convert IOError to RuntimeError

parent 8df4ab84
......@@ -297,9 +297,9 @@ def get_packages_to_build(config_file):
config_file = os.path.abspath(config_file)
f = open(config_file)
except IOError:
raise RuntimeError("Configuration file %s does not exist!"
% config_file)
except IOError as e:
raise IOError("Can not access configuration file %s: %s"
% (config_file, e.strerror))
lines = [l.strip() for l in f.readlines()]
l = [l for l in lines if not l.startswith("#")]
......@@ -127,6 +127,7 @@ def base_version(vcs_info):
l = [l for l in lines if not l.startswith("#")]
if len(l) != 1:
raise ValueError("File '%s' should contain a single non-comment line.")
return l[0]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment