Merge lp:~justinmcp/unity-webapps-gmail/fix-module-imports into lp:unity-webapps-gmail

Proposed by Justin McPherson
Status: Needs review
Proposed branch: lp:~justinmcp/unity-webapps-gmail/fix-module-imports
Merge into: lp:unity-webapps-gmail
Diff against target: 33 lines (+5/-8)
1 file modified
scripts/update-desktop-file-unity-webapps-gmail.py (+5/-8)
To merge this branch: bzr merge lp:~justinmcp/unity-webapps-gmail/fix-module-imports
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
WebApps Pending
Review via email: mp+256090@code.launchpad.net

Commit message

Fix module imports.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
104. By Justin McPherson <justin@phablet-dev>

Update to python 3

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Unmerged revisions

104. By Justin McPherson <justin@phablet-dev>

Update to python 3

103. By Justin McPherson <justin@phablet-dev>

Fix module imports.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'scripts/update-desktop-file-unity-webapps-gmail.py'
--- scripts/update-desktop-file-unity-webapps-gmail.py 2014-03-07 01:12:40 +0000
+++ scripts/update-desktop-file-unity-webapps-gmail.py 2015-04-15 03:51:18 +0000
@@ -1,15 +1,12 @@
1#!/usr/bin/python1#!/usr/bin/python3
2from gi.repository import Gio2from gi.repository import GLib
3import os3import os
4import glib
5import glob
6import re
74
8APP_ID = 'Gmailmailgooglecom'5APP_ID = 'Gmailmailgooglecom'
9DESKTOP_FILENAMES = ['Gmailmailgooglecom.desktop', 'GMailmailgooglecom.desktop']6DESKTOP_FILENAMES = ['Gmailmailgooglecom.desktop', 'GMailmailgooglecom.desktop']
107
11def get_local_applications_path():8def get_local_applications_path():
12 return os.path.join(glib.get_user_data_dir(), 'applications')9 return os.path.join(GLib.get_user_data_dir(), 'applications')
1310
14def update_desktop_file_startupwmclass():11def update_desktop_file_startupwmclass():
15 local_applications_path = get_local_applications_path()12 local_applications_path = get_local_applications_path()
@@ -27,8 +24,8 @@
27 start_idx += len('[Desktop Entry]')24 start_idx += len('[Desktop Entry]')
28 updated_desktop_file_content = desktop_file_content[:start_idx] + '\nStartupWMClass={0}'.format(APP_ID) + desktop_file_content[start_idx:]25 updated_desktop_file_content = desktop_file_content[:start_idx] + '\nStartupWMClass={0}'.format(APP_ID) + desktop_file_content[start_idx:]
29 open(desktop_filename, "w+").write(updated_desktop_file_content)26 open(desktop_filename, "w+").write(updated_desktop_file_content)
30 except Exception, e:27 except Exception as e:
31 print 'Error while upgrading the desktop file: ', str(e)28 print('Error while upgrading the desktop file: ', str(e))
3229
33if __name__ == "__main__":30if __name__ == "__main__":
34 update_desktop_file_startupwmclass()31 update_desktop_file_startupwmclass()

Subscribers

People subscribed via source and target branches

to all changes: