Commit a5b86bd3 authored by Michal Čihař's avatar Michal Čihař

pylint fixes

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 4d144c7a
...@@ -28,7 +28,7 @@ def get_openshift_secret_token(): ...@@ -28,7 +28,7 @@ def get_openshift_secret_token():
uuid = os.getenv('OPENSHIFT_APP_UUID') uuid = os.getenv('OPENSHIFT_APP_UUID')
if token is not None: if token is not None:
return token return token
elif (name is not None and uuid is not None): elif name is not None and uuid is not None:
return hashlib.sha256(name + '-' + uuid).hexdigest() return hashlib.sha256(name + '-' + uuid).hexdigest()
return None return None
...@@ -101,7 +101,7 @@ def make_secure_key(key_info): ...@@ -101,7 +101,7 @@ def make_secure_key(key_info):
# Create a random string the same length as the default # Create a random string the same length as the default
rand_key = '' rand_key = ''
for _ in range(len(original)): for dummy in range(len(original)):
rand_pos = random.randint(0, len(chars)) rand_pos = random.randint(0, len(chars))
rand_key += chars[rand_pos:(rand_pos + 1)] rand_key += chars[rand_pos:(rand_pos + 1)]
......
...@@ -112,7 +112,7 @@ pre { ...@@ -112,7 +112,7 @@ pre {
log_msg = os.popen( log_msg = os.popen(
'cat ${OPENSHIFT_PYTHON_LOG_DIR}/install.log |' 'cat ${OPENSHIFT_PYTHON_LOG_DIR}/install.log |'
+ ' grep \'^[^ ]\\|setup.py install\' |' + ' grep \'^[^ ]\\|setup.py install\' |'
+ ' sed \'s,/var/lib/openshift/[a-z0-9]\{24\},~,g\'' + r' sed \'s,/var/lib/openshift/[a-z0-9]\{24\},~,g\''
).read() ).read()
log = '<pre>' + log_msg + '</pre>' log = '<pre>' + log_msg + '</pre>'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment