Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
snf-ganeti
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
itminedu
snf-ganeti
Commits
90c024f6
Commit
90c024f6
authored
16 years ago
by
Guido Trotter
Browse files
Options
Downloads
Patches
Plain Diff
KVM: change a few IOError with EnvironmentError
Reviewed-by: iustinp
parent
30e42c4e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/hypervisor/hv_kvm.py
+4
-4
4 additions, 4 deletions
lib/hypervisor/hv_kvm.py
with
4 additions
and
4 deletions
lib/hypervisor/hv_kvm.py
+
4
−
4
View file @
90c024f6
...
...
@@ -167,7 +167,7 @@ class KVMHypervisor(hv_base.BaseHypervisor):
cmdline
=
fh
.
read
()
finally
:
fh
.
close
()
except
IO
Error
,
err
:
except
Environment
Error
,
err
:
raise
errors
.
HypervisorError
(
"
Failed to list instance %s: %s
"
%
(
instance_name
,
err
))
...
...
@@ -266,7 +266,7 @@ class KVMHypervisor(hv_base.BaseHypervisor):
try
:
utils
.
WriteFile
(
self
.
_InstanceKVMRuntime
(
instance_name
),
data
=
data
)
except
IO
Error
,
err
:
except
Environment
Error
,
err
:
raise
errors
.
HypervisorError
(
"
Failed to save KVM runtime file: %s
"
%
err
)
def
_ReadKVMRuntime
(
self
,
instance_name
):
...
...
@@ -275,7 +275,7 @@ class KVMHypervisor(hv_base.BaseHypervisor):
"""
try
:
file_content
=
utils
.
ReadFile
(
self
.
_InstanceKVMRuntime
(
instance_name
))
except
IO
Error
,
err
:
except
Environment
Error
,
err
:
raise
errors
.
HypervisorError
(
"
Failed to load KVM runtime file: %s
"
%
err
)
return
file_content
...
...
@@ -535,7 +535,7 @@ class KVMHypervisor(hv_base.BaseHypervisor):
data
=
fh
.
readlines
()
finally
:
fh
.
close
()
except
IO
Error
,
err
:
except
Environment
Error
,
err
:
raise
errors
.
HypervisorError
(
"
Failed to list node info: %s
"
%
err
)
result
=
{}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment