~justinmcp/unity-webapps-mail-ru/fix-module-imports

« back to all changes in this revision

Viewing changes to scripts/update-desktop-file-unity-webapps-mail-ru.py

  • Committer: Justin McPherson
  • Date: 2015-04-15 03:43:16 UTC
  • Revision ID: justin@phablet-dev-20150415034316-2o1oc5yayhtdhozv
Update to python 3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/python
 
1
#!/usr/bin/python3
2
2
from gi.repository import GLib
3
3
import os
4
4
 
23
23
            start_idx += len('[Desktop Entry]')
24
24
            updated_desktop_file_content = desktop_file_content[:start_idx] + '\nStartupWMClass={0}'.format(APP_ID) + desktop_file_content[start_idx:]
25
25
            open(desktop_filename, "w+").write(updated_desktop_file_content)
26
 
    except Exception, e:
27
 
        print 'Error while upgrading the desktop file: ', str(e)
 
26
    except Exception as e:
 
27
        print('Error while upgrading the desktop file: ', str(e))
28
28
 
29
29
if __name__ == "__main__":
30
30
    update_desktop_file_startupwmclass()