Skip to content

Commit

Permalink
Merge pull request #211 from mulkieran/fix-type-arg-method
Browse files Browse the repository at this point in the history
Return the argument from the argparse type argument
  • Loading branch information
mulkieran authored Aug 14, 2023
2 parents 066aa70 + f003ea1 commit af18b55
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions testlib/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,13 @@ def revision_number_type(revision_number):
"""
Raise value error if revision number is not valid.
:param revision_number: stratisd D-Bus interface revision number
:rtype: int
:return: proper revision number
"""
revision_number = int(revision_number)
if revision_number < 0:
raise ValueError(revision_number)
return revision_number


def create_relative_device_path(devpath):
Expand Down

0 comments on commit af18b55

Please sign in to comment.