Recent changes (master)

Jens Axboe
2016-09-07T12:00:03Z

The following changes since commit b678fac65b13dabd0f78ceb338547b9acb5a4f2d:

server: bump version (2016-09-02 11:24:59 -0600)

are available in the git repository at:

git://git.kernel.dk/fio.git master

for you to fetch changes up to 27c9aab2d9a45a1babf01a3aa0123e1f5ce36a24:

Makes use of configparser portable to older versions by: - relying on its' own NoOptionError exception - using getter method instead of dictionary overriding - and using readfp() as older version does not autodetect fp vs string types (2016-09-06 10:22:00 -0400)

----------------------------------------------------------------
Karl Cronburg (1):
Makes use of configparser portable to older versions by: - relying on its' own NoOptionError exception - using getter method instead of dictionary overriding - and using readfp() as older version does not autodetect fp vs string types

tools/hist/fiologparser_hist.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

---

Diff of recent changes:

diff --git a/tools/hist/fiologparser_hist.py b/tools/hist/fiologparser_hist.py
index 93dca01..ead5e54 100755
--- a/tools/hist/fiologparser_hist.py
+++ b/tools/hist/fiologparser_hist.py
@@ -257,22 +257,22 @@ def main(ctx):

if ctx.job_file:
try:
- from configparser import SafeConfigParser
+ from configparser import SafeConfigParser, NoOptionError
except ImportError:
- from ConfigParser import SafeConfigParser
+ from ConfigParser import SafeConfigParser, NoOptionError

cp = SafeConfigParser(allow_no_value=True)
with open(ctx.job_file, 'r') as fp:
- cp.read(fp)
+ cp.readfp(fp)

if ctx.interval is None:
# Auto detect --interval value
for s in cp.sections():
try:
- hist_msec = cp[s]['log_hist_msec']
+ hist_msec = cp.get(s, 'log_hist_msec')
if hist_msec is not None:
ctx.interval = int(hist_msec)
- except KeyError:
+ except NoOptionError:
pass