File tree Expand file tree Collapse file tree 2 files changed +33
-25
lines changed
Expand file tree Collapse file tree 2 files changed +33
-25
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,11 @@ async def recover(
119119 :param cursor: A database cursor which can be used to populate the
120120 database with recovered state.
121121 """
122- if self ._state .stage not in {RecoveryStages .inactive , RecoveryStages .download_failed , RecoveryStages .import_failed }:
122+ if self ._state .stage not in {
123+ RecoveryStages .inactive ,
124+ RecoveryStages .download_failed ,
125+ RecoveryStages .import_failed ,
126+ }:
123127 return
124128
125129 self ._set_state (RecoveryState (stage = RecoveryStages .started ))
Original file line number Diff line number Diff line change @@ -1030,18 +1030,20 @@ async def recover():
10301030 lambda messages : list (
10311031 loads (args [0 ]) for (args , kwargs ) in messages
10321032 ),
1033- Equals ([
1034- {
1035- "stage" : "started" ,
1036- "failure-reason" : None ,
1037- },
1038- # "our" downloader (above) doesn't set any downloading etc
1039- # state-updates
1040- {
1041- "stage" : "download_failed" ,
1042- "failure-reason" : "downloader fails" ,
1043- },
1044- ]),
1033+ Equals (
1034+ [
1035+ {
1036+ "stage" : "started" ,
1037+ "failure-reason" : None ,
1038+ },
1039+ # "our" downloader (above) doesn't set any downloading etc
1040+ # state-updates
1041+ {
1042+ "stage" : "download_failed" ,
1043+ "failure-reason" : "downloader fails" ,
1044+ },
1045+ ]
1046+ ),
10451047 )
10461048 ),
10471049 )
@@ -1053,18 +1055,20 @@ async def recover():
10531055 lambda messages : list (
10541056 loads (args [0 ]) for (args , kwargs ) in messages
10551057 ),
1056- Equals ([
1057- {
1058- "stage" : "started" ,
1059- "failure-reason" : None ,
1060- },
1061- # "our" downloader (above) doesn't set any downloading etc
1062- # state-updates
1063- {
1064- "stage" : "succeeded" ,
1065- "failure-reason" : None ,
1066- },
1067- ]),
1058+ Equals (
1059+ [
1060+ {
1061+ "stage" : "started" ,
1062+ "failure-reason" : None ,
1063+ },
1064+ # "our" downloader (above) doesn't set any downloading etc
1065+ # state-updates
1066+ {
1067+ "stage" : "succeeded" ,
1068+ "failure-reason" : None ,
1069+ },
1070+ ]
1071+ ),
10681072 )
10691073 ),
10701074 )
You can’t perform that action at this time.
0 commit comments