c['message_dict'] = []
# Image on term
c['IMAGE_ON_TERM'] = args.image_on_term
- set_config('IMAGE_ON_TERM', str(c['IMAGE_ON_TERM']))
# Use 24 bit color
c['24BIT'] = args.color_24bit
- # Resize images based on the current terminal size
- set_config('IMAGE_RESIZE_TO_FIT', str(c.get('IMAGE_RESIZE_TO_FIT', False)))
# 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.'))
rel = t.mutes.users.create(screen_name=screen_name[1:])
if isinstance(rel, dict):
printNicely(green(screen_name + ' is muted.'))
- c['IGNORE_LIST'] += [unc(screen_name)]
+ c['IGNORE_LIST'] += [screen_name]
c['IGNORE_LIST'] = list(set(c['IGNORE_LIST']))
else:
printNicely(red(rel))
g['prefix'] = False
else:
g['prefix'] = True
- # Release the semaphore lock
- c['lock'] = False
except EOFError:
printNicely('')
except TwitterHTTPError as e:
except Exception:
debug_option()
printNicely(red('OMG something is wrong with Twitter API right now.'))
+ finally:
+ # Release the semaphore lock
+ c['lock'] = False
def reconn_notice():