mozilla/olympia — pull request #314 by magopian (2014-10-06 08:35:24+00:00)
Title: Force unicode when dealing with hive files (bug 1014752)

Fixes [bug 1014752](https://bugzilla.mozilla.org/show_bug.cgi?id=1014752)

This should fix the issue we got from the crons yesterday:

```
Traceback (most recent call last):
File "manage.py", line 93, in
execute_from_command_line(sys.argv)
File "/data/mkt.prod/www/addons.mozilla.org/deploy-olympia-prod-20140929141229-29f3b6aa38/venv/lib/python2.6/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/data/mkt.prod/www/addons.mozilla.org/deploy-olympia-prod-20140929141229-29f3b6aa38/venv/lib/python2.6/site-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/data/mkt.prod/www/addons.mozilla.org/deploy-olympia-prod-20140929141229-29f3b6aa38/venv/lib/python2.6/site-packages/django/core/management/base.py", line 242, in run_from_argv
self.execute(*args, **options.__dict__)
File "/data/mkt.prod/www/addons.mozilla.org/deploy-olympia-prod-20140929141229-29f3b6aa38/venv/lib/python2.6/site-packages/django/core/management/base.py", line 285, in execute
output = self.handle(*args, **options)
File "/data/mkt.prod/www/addons.mozilla.org/deploy-olympia-prod-20140929141229-29f3b6aa38/olympia/apps/stats/management/commands/download_counts_from_file.py", line 115, in handle
if not is_valid_source(src, fulls=fulls, prefixes=prefixes):
File "/data/mkt.prod/www/addons.mozilla.org/deploy-olympia-prod-20140929141229-29f3b6aa38/olympia/apps/stats/management/commands/download_counts_from_file.py", line 28, in is_valid_source
return src in fulls or any(p in src for p in prefixes)
File "/data/mkt.prod/www/addons.mozilla.org/deploy-olympia-prod-20140929141229-29f3b6aa38/olympia/apps/stats/management/commands/download_counts_from_file.py", line 28, in
return src in fulls or any(p in src for p in prefixes)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 6: ordinal not in range(128)
```