summaryrefslogtreecommitdiffstats
path: root/tests/units/test_0007_software.py
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2023-06-13 17:24:41 +0200
committerJose M. Guisado <jguisado@soleta.eu>2023-06-13 17:34:20 +0200
commit926a73cf33896ae62f8255a8f2aca2e0d9a54038 (patch)
tree3a4a43b924a03e98b415380905ebc67548b7ce28 /tests/units/test_0007_software.py
parent88668cb19534c9b7becf479370e8faee4c78ed39 (diff)
fs: fix subprocess input inside _extend_resize2fs
The subprocess module expects bytes-like object for "input" parameter by default. Passing a string object result in the following error: (2023-06-13 14:44:43) ogClient: [ERROR] - Exception when running "image create" subprocess (2023-06-13 14:44:43) ogClient: [ERROR] - Unexpected error Traceback (most recent call last): File "/opt/opengnsys/ogClient/src/live/ogOperations.py", line 465, in image_create ogExtendFs(disk, partition) File "/opt/opengnsys/ogClient/src/utils/fs.py", line 124, in ogExtendFs _extend_ntfsresize(partdev) File "/opt/opengnsys/ogClient/src/utils/fs.py", line 250, in _extend_ntfsresize proc = subprocess.run(cmd, input='y') File "/usr/lib/python3.8/subprocess.py", line 495, in run stdout, stderr = process.communicate(input, timeout=timeout) File "/usr/lib/python3.8/subprocess.py", line 1013, in communicate self._stdin_write(input) File "/usr/lib/python3.8/subprocess.py", line 962, in _stdin_write self.stdin.write(input) TypeError: a bytes-like object is required, not 'str' Fixes: dd999bfe34e7 ("utils: rewrite ogReduceFs")
Diffstat (limited to 'tests/units/test_0007_software.py')
0 files changed, 0 insertions, 0 deletions