Skip to content

Commit 47d49d8

Browse files
committed
Fix missing imports and typos/C&P bugs
1 parent d96c1a6 commit 47d49d8

8 files changed

Lines changed: 12 additions & 7 deletions

File tree

spython/image/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import hashlib
99
import os
1010
import re
11-
11+
from spython.logger import bot
1212

1313
class ImageBase(object):
1414

spython/image/cmd/create.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
77

88

9+
import os
910
from spython.logger import bot
1011

1112
def create(self,image_path, size=1024, sudo=False):

spython/image/cmd/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
77

88

9+
import os
910
from spython.logger import bot
1011

1112
def compress(self, image_path):

spython/instance/cmd/iutils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed
66
# with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
77

8+
from spython.instance import Instance
9+
from spython.logger import bot
810

911
def parse_table(table_string, header, remove_rows=1):
1012
'''parse a table to json from a string, where a header is expected by default.
@@ -49,7 +51,7 @@ def get(self, name, return_json=False, quiet=False):
4951
cmd = self._init_command(subgroup)
5052

5153
cmd.append(name)
52-
output = run_command(cmd, quiet=True)
54+
output = self.run_command(cmd, quiet=True)
5355

5456
# Success, we have instances
5557

spython/logger/progress.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def bar(it, label='', width=32, hide=None, empty_char=BAR_EMPTY_CHAR,
104104

105105
count = len(it) if expected_size is None else expected_size
106106

107-
with Bar(label=label, width=width, hide=hide, empty_char=BAR_EMPTY_CHAR,
107+
with ProgressBar(label=label, width=width, hide=hide, empty_char=BAR_EMPTY_CHAR,
108108
filled_char=BAR_FILLED_CHAR, expected_size=count, every=every) \
109109
as bar:
110110
for i, item in enumerate(it):

spython/main/parse/converters.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88

99
import re
10+
from spython.logger import bot
1011

1112
from spython.logger import bot
1213

spython/main/parse/recipe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ def _clean_line(self, line):
282282
return line.split('#')[0].strip()
283283

284284

285-
def _write_script(path, lines, chmod=True):
285+
def _write_script(self, path, lines, chmod=True):
286286
'''write a script with some lines content to path in the image. This
287287
is done by way of adding echo statements to the install section.
288288
@@ -296,7 +296,7 @@ def _write_script(path, lines, chmod=True):
296296
if len(lines) > 0:
297297
lastline = lines.pop()
298298
for line in lines:
299-
self.install.append('echo "%s" >> %s' %path)
299+
self.install.append('echo "%s" >> %s' %line %path)
300300
self.install.append(lastline)
301301

302302
if chmod is True:

spython/oci/cmd/mounts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ def mount(self, image, sudo=None):
1616
return self._state_command(image, command="mount", sudo=sudo)
1717

1818

19-
def umount(self, image):
20-
'''delete an OCI bundle createdfrom SIF image
19+
def umount(self, image, sudo=None):
20+
'''delete an OCI bundle created from SIF image
2121
2222
Parameters
2323
==========

0 commit comments

Comments
 (0)