4747from itertools import cycle
4848from threading import Event
4949from threading import Thread
50- import base64
5150import glob
5251import json
5352import locale
@@ -175,17 +174,6 @@ def __init__(self):
175174 self ._path = os .path .join (path , 'client.json' )
176175 if not os .path .exists (self ._path ):
177176 settings = {}
178- # try once to convert the old settings file if it exists
179- # FIXME: this code can be removed in November 2014 or thereabouts, that's long enough.
180- old_path = os .path .join (path , 'client.yaml' )
181- if os .path .exists (old_path ):
182- try :
183- with open (old_path , 'r' ) as f :
184- txt = f .read ().replace ('{' , '{"' , 1 ).replace (':' , '":' , 1 ).replace ("'" , '"' )
185- settings = json .loads (txt )
186- os .remove (old_path )
187- except :
188- pass # ignore errors, at least we tried to convert it
189177 with open (self ._path , 'w' ) as f :
190178 json .dump (settings , f )
191179 # load initial settings
@@ -638,6 +626,7 @@ def apps_logs(self, args):
638626 log_tag = line .split (': ' )[0 ].split (' ' )[1 ]
639627 # colorize the log based on the tag
640628 color = sum ([ord (ch ) for ch in log_tag ]) % 6
629+
641630 def f (x ):
642631 return {
643632 0 : 'green' ,
@@ -797,7 +786,6 @@ def auth_login(self, args):
797786 if not urlparse .urlparse (controller ).scheme :
798787 controller = "http://{}" .format (controller )
799788 username = args .get ('--username' )
800- headers = {}
801789 if not username :
802790 username = raw_input ('username: ' )
803791 password = args .get ('--password' )
@@ -810,7 +798,7 @@ def auth_login(self, args):
810798 payload = {'username' : username , 'password' : password }
811799 # post credentials to the login URL
812800 response = self ._session .post (url , data = payload , allow_redirects = False ,
813- verify = ssl_verify )
801+ verify = ssl_verify )
814802 if response .status_code == requests .codes .ok :
815803 # retrieve and save the API token for future requests
816804 self ._settings ['controller' ] = controller
@@ -1562,8 +1550,9 @@ def tags_set(self, args):
15621550 """
15631551 Sets tags for an application.
15641552
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.
1553+ A tag is a key/value pair used to tag an application's containers and is passed to the
1554+ scheduler. This is often used to restrict workloads to specific hosts matching the
1555+ scheduler-configured metadata.
15671556
15681557 Usage: deis tags:set [options] <key>=<value>...
15691558
0 commit comments