-
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.
We stopped caring about Python 2 support long time ago and with libblockdev 3.0 which is Python 3 only it wouldn't even be possible to support Python 2 so we should finally remove it.
- Loading branch information
1 parent
53dfc31
commit 8a2e395
Showing
65 changed files
with
203 additions
and
427 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.