if args.ignore:
printNicely(red('Ignore: ' + str(len(args.ignore)) + ' people.'))
printNicely('')
- except Exception:
+ except:
debug_option()
printNicely(red('Sorry I can\'t understand.'))
value = get_default_config(key)
line = ' ' * 2 + green(key) + ': ' + light_magenta(value)
printNicely(line)
- except Exception as e:
- printNicely(red(e))
+ except:
+ debug_option()
+ printNicely(red('Just can not get the default.'))
# Delete specific config key in config file
elif len(g['stuff'].split()) == 2 and g['stuff'].split()[-1] == 'drop':
key = g['stuff'].split()[0]
try:
delete_config(key)
printNicely(green('Config key is dropped.'))
- except Exception as e:
- printNicely(red(e))
+ except:
+ debug_option()
+ printNicely(red('Just can not drop the key.'))
# Set specific config
elif len(g['stuff'].split()) == 3 and g['stuff'].split()[1] == '=':
key = g['stuff'].split()[0]
return
try:
set_config(key, value)
- # Apply theme immediately
+ # Keys that needs to be apply immediately
if key == 'THEME':
c['THEME'] = reload_theme(value, c['THEME'])
g['decorated_name'] = lambda x: color_func(
c['DECORATED_NAME'])('[' + x + ']: ')
+ elif key == 'PREFIX':
+ g['PREFIX'] = u2str(emojize(c['PREFIX']))
reload_config()
printNicely(green('Updated successfully.'))
- except Exception as e:
- printNicely(red(e))
+ except:
+ debug_option()
+ printNicely(red('Just can not set the key.'))
else:
printNicely(light_magenta('Sorry I can\'s understand.'))