From 10bb4900c031cfbece8f9f71ce7e8307a0874a68 Mon Sep 17 00:00:00 2001 From: Mriyam Tamuli Date: Thu, 13 Oct 2016 19:13:29 +0530 Subject: [PATCH] Correct indentation --- contrib/dokku-installer.py | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/contrib/dokku-installer.py b/contrib/dokku-installer.py index 0e103d010..9c897fc70 100755 --- a/contrib/dokku-installer.py +++ b/contrib/dokku-installer.py @@ -133,27 +133,27 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): self.wfile.write(json.dumps({'status': 'ok'})) def web_admin_user_exists(self): - return self.user_exists('web-admin(\d+)') + return self.user_exists('web-admin(\d+)') def admin_user_exists(self): - return self.user_exists('admin(\d+)') + return self.user_exists('admin(\d+)') def user_exists(self, name): - command = 'dokku ssh-keys:list' - pattern = re.compile(r'NAME="' + name + '"') - proc = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE) - max_num = 0 - exists = False - for line in proc.stdout: - m = pattern.search(line) - if m: - # User of the form `user` or `user#` exists - exists = True - max_num = max(max_num, m.group(1)) - if exists: - return max_num - else: - return None + command = 'dokku ssh-keys:list' + pattern = re.compile(r'NAME="' + name + '"') + proc = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE) + max_num = 0 + exists = False + for line in proc.stdout: + m = pattern.search(line) + if m: + # User of the form `user` or `user#` exists + exists = True + max_num = max(max_num, m.group(1)) + if exists: + return max_num + else: + return None def set_debconf_selection(debconf_type, key, value):