Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:aschnell:boost
virt-bootstrap
c8ce262cf346535713d45b4660cfdc02c99cfd4c.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File c8ce262cf346535713d45b4660cfdc02c99cfd4c.patch of Package virt-bootstrap
From c8ce262cf346535713d45b4660cfdc02c99cfd4c Mon Sep 17 00:00:00 2001 From: Radostin Stoyanov <rstoyanov1@gmail.com> Date: Sat, 3 Aug 2019 15:43:15 +0100 Subject: [PATCH] pylint: Fix unsubscriptable-object Value 'root_password' is unsubscriptable (unsubscriptable-object) Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com> --- tests/__init__.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/__init__.py b/tests/__init__.py index ce0d5fa..f5a9613 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -334,15 +334,14 @@ def validate_shadow_hash(self, shadow_content): Note: For simplicity we assume that the first line of /etc/shadow contains the root entry. """ - root_password = self.root_password - if root_password and root_password.startswith('file:'): - root_password_file = root_password[len('file:'):] - with open(root_password_file) as pwdfile: - root_password = pwdfile.readline().rstrip("\n\r") + + if self.root_password.startswith('file:'): + with open(self.root_password[len('file:'):]) as pwdfile: + self.root_password = pwdfile.readline().rstrip("\n\r") self.assertTrue( passlib.hosts.linux_context.verify( - root_password, + self.root_password, shadow_content[0].split(':')[1] ), "Invalid root password hash."
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor