X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=rainbowstream%2Frainbow.py;h=742c4e9cf2b85e3d76ac227d3c2560c8a4fef0c6;hb=d4b36355938733b0f2d3434057716a1b917a96d1;hp=c18fe15c349d798dad0d66430671877b170e8c8f;hpb=646a7fbb69a39a95028c9455cf6adfda3506a86f;p=rainbowstream.git diff --git a/rainbowstream/rainbow.py b/rainbowstream/rainbow.py index c18fe15..742c4e9 100644 --- a/rainbowstream/rainbow.py +++ b/rainbowstream/rainbow.py @@ -183,6 +183,13 @@ def init(args): # Image on term c['IMAGE_ON_TERM'] = args.image_on_term set_config('IMAGE_ON_TERM', str(c['IMAGE_ON_TERM'])) + # Check type of ONLY_LIST and IGNORE_LIST + if not isinstance(c['ONLY_LIST'], list): + printNicely(red('ONLY_LIST is not a valid list value.')) + c['ONLY_LIST'] = [] + if not isinstance(c['IGNORE_LIST'], list): + printNicely(red('IGNORE_LIST is not a valid list value.')) + c['IGNORE_LIST'] = [] # Mute dict c['IGNORE_LIST'] += build_mute_dict() @@ -1177,9 +1184,6 @@ def switch(): ignore = raw_input('Ignore nicks [Ex: @xxx,@yy]: ') args.filter = filter(None, only.split(',')) args.ignore = filter(None, ignore.split(',')) - elif g['stuff'].split()[-1] == '-d': - args.filter = c['ONLY_LIST'] - args.ignore = c['IGNORE_LIST'] except: printNicely(red('Sorry, wrong format.')) return @@ -1536,8 +1540,6 @@ def help_stream(): ' filter will decide nicks will be INCLUDE ONLY.\n' usage += s * 3 + light_yellow('Ignore nicks') + \ ' filter will decide nicks will be EXCLUDE.\n' - usage += s * 2 + light_green('switch mine -d') + \ - ' will use the config\'s ONLY_LIST and IGNORE_LIST.\n' usage += s * 2 + light_green('switch list') + \ ' will switch to a Twitter list\'s stream. You will be asked for list name\n' printNicely(usage)