File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -3253,17 +3253,19 @@ def streamP4FilesCb(self, marshalled):
3253
3253
if self .stream_have_file_info :
3254
3254
if "depotFile" in self .stream_file :
3255
3255
f = self .stream_file ["depotFile" ]
3256
- # force a failure in fast-import, else an empty
3257
- # commit will be made
3258
- self .gitStream .write ("\n " )
3259
- self .gitStream .write ("die-now\n " )
3260
- self .gitStream .close ()
3261
- # ignore errors, but make sure it exits first
3262
- self .importProcess .wait ()
3263
- if f :
3264
- die ("Error from p4 print for %s: %s" % (f , err ))
3265
- else :
3266
- die ("Error from p4 print: %s" % err )
3256
+ try :
3257
+ # force a failure in fast-import, else an empty
3258
+ # commit will be made
3259
+ self .gitStream .write ("\n " )
3260
+ self .gitStream .write ("die-now\n " )
3261
+ self .gitStream .close ()
3262
+ # ignore errors, but make sure it exits first
3263
+ self .importProcess .wait ()
3264
+ finally :
3265
+ if f :
3266
+ die ("Error from p4 print for %s: %s" % (f , err ))
3267
+ else :
3268
+ die ("Error from p4 print: %s" % err )
3267
3269
3268
3270
if 'depotFile' in marshalled and self .stream_have_file_info :
3269
3271
# start of a new file - output the old one first
You can’t perform that action at this time.
0 commit comments