Skip to content

Commit

Permalink
issue-67: Create storage_lsr sub-directory under module_utils and mov…
Browse files Browse the repository at this point in the history
…e size.py there

#67
Have to rename a couple of imports to handle this case.
Another issue is that python 2.x does not find the module unless
it has an `__init__.py` in the `storage_lsr/` sub-directory.
  • Loading branch information
richm committed Oct 27, 2020
1 parent 00a6803 commit cf8f8aa
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion library/bsize.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
'''

from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.size import Size
from ansible.module_utils.storage_lsr.size import Size

def run_module():
# available arguments/parameters that a user can pass
Expand Down
2 changes: 1 addition & 1 deletion library/find_unused_disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
import re

from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.size import Size
from ansible.module_utils.storage_lsr.size import Size


SYS_CLASS_BLOCK = "/sys/class/block/"
Expand Down
Empty file.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/unit/bsize_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest

from size import Size
from storage_lsr.size import Size

def test_bsize():
# check failure on incorrect string
Expand Down

0 comments on commit cf8f8aa

Please sign in to comment.