-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1195 from vojtechtrefny/3.10-devel_python2-suppor…
…t-remove Various code cleanup
- Loading branch information
Showing
88 changed files
with
266 additions
and
641 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,8 +20,6 @@ | |
# Red Hat Author(s): David Lehman <[email protected]> | ||
# | ||
|
||
from six import raise_from | ||
|
||
from .storage_log import log_method_call | ||
from .errors import DeviceFactoryError, StorageError | ||
from .devices import BTRFSDevice, DiskDevice | ||
|
@@ -746,7 +744,7 @@ def _create_device(self): | |
except (StorageError, blockdev.BlockDevError) as e: | ||
log.error("device post-create method failed: %s", e) | ||
self.storage.destroy_device(device) | ||
raise_from(StorageError(e), e) | ||
raise StorageError(e) from e | ||
else: | ||
if not device.size: | ||
self.storage.destroy_device(device) | ||
|
@@ -941,7 +939,7 @@ def configure(self): | |
self._revert_devicetree() | ||
|
||
if not isinstance(e, (StorageError, OverflowError)): | ||
raise_from(DeviceFactoryError(e), e) | ||
raise DeviceFactoryError(e) from e | ||
|
||
raise | ||
|
||
|
@@ -2189,7 +2187,7 @@ def _create_device(self): | |
except (StorageError, blockdev.BlockDevError) as e: | ||
log.error("device post-create method failed: %s", e) | ||
self.storage.destroy_device(device) | ||
raise_from(StorageError(e), e) | ||
raise StorageError(e) from e | ||
else: | ||
if not device.size: | ||
self.storage.destroy_device(device) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,8 +20,6 @@ | |
# Red Hat Author(s): David Lehman <[email protected]> | ||
# | ||
|
||
from six import add_metaclass | ||
|
||
from ..callbacks import callbacks | ||
from ..errors import DeviceError, EventHandlingError | ||
from ..devices import DM_MAJORS, MD_MAJORS | ||
|
@@ -37,8 +35,7 @@ | |
event_log = logging.getLogger("blivet.event") | ||
|
||
|
||
@add_metaclass(SynchronizedMeta) | ||
class EventHandlerMixin(object): | ||
class EventHandlerMixin(object, metaclass=SynchronizedMeta): | ||
def __init__(self): | ||
event_manager.handler_cb = self.handle_event | ||
|
||
|
Oops, something went wrong.