emojifs
emojifs copied to clipboard
graceful handling of garbage aliases
This emoji object exists in the wild and currently makes readdir() on the Slack's directory throw:
File "/home/cdanis/personal/emojifs/emojifs/slack.py", line 172, in _emoji_to_filename
if e['url'].startswith('http'):
AttributeError: 'NoneType' object has no attribute 'startswith'
{
"name": "sol_ring",
"is_alias": 1,
"alias_for": "",
"url": null,
"created": 1477339155,
"team_id": "Txxxxx",
"user_id": "Uxxxxx",
"user_display_name": "jxxxx",
"avatar_hash": "1xxxxx",
"can_delete": true,
"is_bad": false,
"synonyms": [
"",
"sol_ring"
]
}
It probably should be rendered as a dangling symlink, with no extension.
@kprevas I think you fixed this exact issue...?
yep!