Skip to content

Commit

Permalink
fix python3 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
kofemann committed Nov 17, 2019
1 parent 943407e commit 63de05f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mdbench.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ def get_size(s):

last_symbol = s[-1:].lower()
if last_symbol in string.digits:
return long(s)
return int(s)

if not DATA_SIZES.has_key(last_symbol):
raise Exception('Invalid format: %s' % s)

return long(s[:-1])*DATA_SIZES[last_symbol]
return int(s[:-1])*DATA_SIZES[last_symbol]

def make_dirs(root, count):
for i in range(count):
Expand Down

0 comments on commit 63de05f

Please sign in to comment.