Unable to generate files for pretty diff
### How did it happen?
1. when I click "Generate files for pretty diffs" or commit with  "Generate files for pretty diffs" 

### Error log

```
  File "<string>", line 1
    import urllib;print urllib.quote(raw_input())
                             ^
SyntaxError: invalid syntax

```