Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed rootfs_proxy.py:64:17: and __init__.py issue #1

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/confcom/azext_confcom/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType

confcom_custom = CliCommandType(operations_tmpl="azext_confcom.custom#{}")
super(ConfcomCommandsLoader, self).__init__(
cli_ctx=cli_ctx, custom_command_type=confcom_custom
)
super().__init__(cli_ctx=cli_ctx, custom_command_type=confcom_custom)

def load_command_table(self, args):
from azext_confcom.commands import load_command_table
Expand Down
10 changes: 7 additions & 3 deletions src/confcom/azext_confcom/rootfs_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,17 @@ def get_policy_image_layers(
# add the image to the end of the parameter list
arg_list += ["roothash", "-i", f"{img}"]

layers = subprocess.Popen(
outputlines = None
err = None

with subprocess.Popen(
arg_list,
executable=policy_bin_str,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
outputlines, err = layers.communicate()
) as layers:
outputlines, err = layers.communicate()

output = []
if outputlines is None:
eprint("Null pointer detected.")
Expand Down