@@ -306,10 +306,10 @@ def read_host_configs(self, domain=1):
306306
307307 response = self .send (request , 'BlobStorageConfig' ).BlobStorageConfigResponse
308308 if not response .Success :
309- raise RuntimeError (f 'read_host_config request failed: { response .ErrorDescription } ' )
309+ raise RuntimeError ('read_host_config request failed: %s' % response .ErrorDescription )
310310 status = response .Status [0 ]
311311 if not status .Success :
312- raise RuntimeError (f 'read_host_config has failed status: { status .ErrorDescription } ' )
312+ raise RuntimeError ('read_host_config has failed status: %s' % status .ErrorDescription )
313313
314314 return status .HostConfig
315315
@@ -321,10 +321,10 @@ def define_host_configs(self, host_configs, domain=1):
321321
322322 response = self .send (request , 'BlobStorageConfig' ).BlobStorageConfigResponse
323323 if not response .Success :
324- raise RuntimeError (f 'define_host_config request failed: { response .ErrorDescription } ' )
324+ raise RuntimeError ('define_host_config request failed: %s' % response .ErrorDescription )
325325 for i , status in enumerate (response .Status ):
326326 if not status .Success :
327- raise RuntimeError (f 'define_host_config has failed status[{ i } ]: { status } ' )
327+ raise RuntimeError ('define_host_config has failed status[%d ]: %s' % ( i , status ) )
328328
329329 def read_storage_pools (self , domain = 1 ):
330330 request = msgbus .TBlobStorageConfigRequest ()
@@ -334,11 +334,11 @@ def read_storage_pools(self, domain=1):
334334
335335 response = self .send (request , 'BlobStorageConfig' ).BlobStorageConfigResponse
336336 if not response .Success :
337- raise RuntimeError (f 'read_storage_pools request failed: { response .ErrorDescription } ' )
337+ raise RuntimeError ('read_storage_pools request failed: %s' % response .ErrorDescription )
338338
339339 status = response .Status [0 ]
340340 if not status .Success :
341- raise RuntimeError (f 'read_storage_pools has failed status: { status .ErrorDescription } ' )
341+ raise RuntimeError ('read_storage_pools has failed status: %s' % status .ErrorDescription )
342342
343343 return status .StoragePool
344344
@@ -360,10 +360,10 @@ def pdisk_set_all_active(self, pdisk_path=None, domain=1):
360360 response = self .send (request , 'BlobStorageConfig' ).BlobStorageConfigResponse
361361
362362 if not response .Success :
363- raise RuntimeError (f 'update_all_drive_status_active request failed: { response .ErrorDescription } ' )
363+ raise RuntimeError ('update_all_drive_status_active request failed: %s' % response .ErrorDescription )
364364 for i , status in enumerate (response .Status ):
365365 if not status .Success :
366- raise RuntimeError (f 'update_all_drive_status_active has failed status[{ i } ]: { status } ' )
366+ raise RuntimeError ('update_all_drive_status_active has failed status[%d ]: %s' % ( i , status ) )
367367
368368 def query_base_config (self , domain = 1 ):
369369 request = msgbus .TBlobStorageConfigRequest ()
@@ -375,11 +375,11 @@ def query_base_config(self, domain=1):
375375
376376 response = self .send (request , 'BlobStorageConfig' ).BlobStorageConfigResponse
377377 if not response .Success :
378- raise RuntimeError (f 'query_base_config failed: { response .ErrorDescription } ' )
378+ raise RuntimeError ('query_base_config failed: %s' % response .ErrorDescription )
379379
380380 status = response .Status [0 ]
381381 if not status .Success :
382- raise RuntimeError (f 'query_base_config failed: { status .ErrorDescription } ' )
382+ raise RuntimeError ('query_base_config failed: %s' % status .ErrorDescription )
383383
384384 return status
385385
0 commit comments