Skip to content

Commit

Permalink
Change all instances of GLib.Error to GLib.GError.
Browse files Browse the repository at this point in the history
This is the precise error the invoked functions are returning and GError
is a more precise match than Error in false positives.

Signed-off-by: mulhern <amulhern@redhat.com>
  • Loading branch information
mulkieran committed Mar 7, 2015
1 parent 3bf4b45 commit f530c55
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions blivet/devices/btrfs.py
Expand Up @@ -356,7 +356,7 @@ def _getDefaultSubVolumeID(self):
subvolid = None
try:
subvolid = blockdev.btrfs_get_default_subvolume_id(self.originalFormat._mountpoint)
except GLib.Error as e:
except GLib.GError as e:
log.debug("failed to get default subvolume id: %s", e)

self._defaultSubVolumeID = subvolid
Expand All @@ -368,7 +368,7 @@ def _setDefaultSubVolumeID(self, vol_id):
"""
try:
blockdev.btrfs_set_default_subvolume(self.originalFormat._mountpoint, vol_id)
except GLib.Error as e:
except GLib.GError as e:
log.error("failed to set new default subvolume id (%s): %s",
vol_id, e)
# The only time we set a new default subvolume is so we can remove
Expand Down
2 changes: 1 addition & 1 deletion blivet/devicetree.py
Expand Up @@ -1154,7 +1154,7 @@ def addUdevDevice(self, info):
if devname:
try:
blockdev.md_run(devname)
except GLib.Error as e:
except GLib.GError as e:
log.warning("Failed to start possibly degraded md array: %s", e)
else:
udev.settle()
Expand Down

0 comments on commit f530c55

Please sign in to comment.