@@ -86,7 +86,7 @@ def create_bare_destination() -> DuplicateResult:
86
86
return DuplicateResult .NOTHING
87
87
case btrfsutil .ERROR_SNAP_CREATE_FAILED :
88
88
return create_bare_destination ()
89
- case other :
89
+ case _ :
90
90
raise error
91
91
for internal_subvolume in _internal_subvolumes :
92
92
internal_source_path = os .path .join (source_path , internal_subvolume )
@@ -171,9 +171,9 @@ def read_active_snapshot_id(self) -> int:
171
171
try :
172
172
with open (self ._active_snapshot_id_path (), "r" ) as file :
173
173
return int (file .read ())
174
- except OSError as error :
174
+ except OSError :
175
175
return - 1
176
-
176
+
177
177
def create_snapshot (self , description : str ) -> int :
178
178
snapshot_id = max (self ._snapshots .keys (), default = - 1 ) + 1
179
179
snapshot_path = self ._snapshot_path2 (snapshot_id , description )
@@ -232,7 +232,7 @@ def convert_states(self):
232
232
233
233
def is_initialized (self ):
234
234
# Nothing to initialize
235
- return true
235
+ return True
236
236
237
237
def re_initialize (self ):
238
238
# Nothing to initialize
@@ -257,12 +257,11 @@ def list_states(self) -> Result:
257
257
data = {"state_id" : active_state_id , "states" : self .convert_states ()},
258
258
message = "Retrieved list of states" ,
259
259
)
260
-
260
+
261
261
def set_state (
262
262
self , state_id : int , after : callable
263
263
) -> Result :
264
264
self ._handle .set_state (state_id )
265
265
if after :
266
266
after ()
267
267
return Result (True )
268
-
0 commit comments