Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
devflow
Commits
fe584cc4
Commit
fe584cc4
authored
Jan 21, 2013
by
Christos Stavrakakis
Browse files
Do not convert IOError to RuntimeError
parent
8df4ab84
Changes
2
Hide whitespace changes
Inline
Side-by-side
devflow/autopkg.py
View file @
fe584cc4
...
...
@@ -297,9 +297,9 @@ def get_packages_to_build(config_file):
config_file
=
os
.
path
.
abspath
(
config_file
)
try
:
f
=
open
(
config_file
)
except
IOError
:
raise
Runtime
Error
(
"Configuration file %s
does not exist!
"
%
config_file
)
except
IOError
as
e
:
raise
IO
Error
(
"C
an not access c
onfiguration 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
(
"#"
)]
...
...
devflow/versioning.py
View file @
fe584cc4
...
...
@@ -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."
)
f
.
close
()
return
l
[
0
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment