@@ -1332,9 +1332,9 @@ def input_file_bytes(self):
13321332 :returns: the count (None until set from the server).
13331333 :raises: ValueError for invalid value types.
13341334 """
1335- statistics = self . _properties . get ( 'statistics' )
1336- if statistics is not None :
1337- return int ( statistics [ 'load' ][ 'inputFileBytes' ] )
1335+ return _helpers . _get_sub_prop (
1336+ self . _properties , [ 'statistics' , 'load' , 'inputFileBytes' ]
1337+ )
13381338
13391339 @property
13401340 def input_files (self ):
@@ -1343,9 +1343,9 @@ def input_files(self):
13431343 :rtype: int, or ``NoneType``
13441344 :returns: the count (None until set from the server).
13451345 """
1346- statistics = self . _properties . get ( 'statistics' )
1347- if statistics is not None :
1348- return int ( statistics [ 'load' ][ 'inputFiles' ] )
1346+ return _helpers . _get_sub_prop (
1347+ self . _properties , [ 'statistics' , 'load' , 'inputFiles' ]
1348+ )
13491349
13501350 @property
13511351 def output_bytes (self ):
@@ -1354,9 +1354,9 @@ def output_bytes(self):
13541354 :rtype: int, or ``NoneType``
13551355 :returns: the count (None until set from the server).
13561356 """
1357- statistics = self . _properties . get ( 'statistics' )
1358- if statistics is not None :
1359- return int ( statistics [ 'load' ][ 'outputBytes' ] )
1357+ return _helpers . _get_sub_prop (
1358+ self . _properties , [ 'statistics' , 'load' , 'outputBytes' ]
1359+ )
13601360
13611361 @property
13621362 def output_rows (self ):
@@ -1365,9 +1365,9 @@ def output_rows(self):
13651365 :rtype: int, or ``NoneType``
13661366 :returns: the count (None until set from the server).
13671367 """
1368- statistics = self . _properties . get ( 'statistics' )
1369- if statistics is not None :
1370- return int ( statistics [ 'load' ][ 'outputRows' ] )
1368+ return _helpers . _get_sub_prop (
1369+ self . _properties , [ 'statistics' , 'load' , 'outputRows' ]
1370+ )
13711371
13721372 def to_api_repr (self ):
13731373 """Generate a resource for :meth:`_begin`."""
0 commit comments