Fix unicode issue when printing history names in cleanup_datasets.py script

#196 Merged at fe5a566
Repository
Deleted repository
Branch
cleanup_datasets_unicode_fix (b245b46ec4c0)
Repository
galaxy-central
Branch
default
Author
  1. Lance Parsons
Reviewers
Description

History names with Unicode characters would raise a UnicodeEncodeError exception in cleanup_datasets.py:

Traceback (most recent call last):
  File "./scripts/cleanup_datasets/cleanup_datasets.py", line 524, in <module>
    if __name__ == "__main__": main()
  File "./scripts/cleanup_datasets/cleanup_datasets.py", line 118, in main
    purge_histories( app, cutoff_time, options.remove_from_disk, info_only = options.info_only, force_retry = options.force_retry )
  File "./scripts/cleanup_datasets/cleanup_datasets.py", line 178, in purge_histories
    print "### Processing history id %d (%s)" % (history.id, history.name) 
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2206' in position 32: ordinal not in range(128)

Comments (0)