4747from itertools import cycle
4848from threading import Event
4949from threading import Thread
50- import base64
5150import glob
5251import json
5352import locale
@@ -181,7 +180,8 @@ def __init__(self):
181180 if os .path .exists (old_path ):
182181 try :
183182 with open (old_path , 'r' ) as f :
184- txt = f .read ().replace ('{' , '{"' , 1 ).replace (':' , '":' , 1 ).replace ("'" , '"' )
183+ txt = f .read ()
184+ txt = txt .replace ('{' , '{"' , 1 ).replace (':' , '":' , 1 ).replace ("'" , '"' )
185185 settings = json .loads (txt )
186186 os .remove (old_path )
187187 except :
@@ -638,6 +638,7 @@ def apps_logs(self, args):
638638 log_tag = line .split (': ' )[0 ].split (' ' )[1 ]
639639 # colorize the log based on the tag
640640 color = sum ([ord (ch ) for ch in log_tag ]) % 6
641+
641642 def f (x ):
642643 return {
643644 0 : 'green' ,
@@ -797,7 +798,6 @@ def auth_login(self, args):
797798 if not urlparse .urlparse (controller ).scheme :
798799 controller = "http://{}" .format (controller )
799800 username = args .get ('--username' )
800- headers = {}
801801 if not username :
802802 username = raw_input ('username: ' )
803803 password = args .get ('--password' )
@@ -810,7 +810,7 @@ def auth_login(self, args):
810810 payload = {'username' : username , 'password' : password }
811811 # post credentials to the login URL
812812 response = self ._session .post (url , data = payload , allow_redirects = False ,
813- verify = ssl_verify )
813+ verify = ssl_verify )
814814 if response .status_code == requests .codes .ok :
815815 # retrieve and save the API token for future requests
816816 self ._settings ['controller' ] = controller
@@ -1562,8 +1562,9 @@ def tags_set(self, args):
15621562 """
15631563 Sets tags for an application.
15641564
1565- A tag is a key/value pair used to tag an application's containers and is passed to the scheduler.
1566- This is often used to restrict workloads to specific hosts matching the scheduler-configured metadata.
1565+ A tag is a key/value pair used to tag an application's containers and is passed to the
1566+ scheduler. This is often used to restrict workloads to specific hosts matching the
1567+ scheduler-configured metadata.
15671568
15681569 Usage: deis tags:set [options] <key>=<value>...
15691570
0 commit comments