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
1=== modified file 'scripts/update-desktop-file-unity-webapps-gmail.py'
2--- scripts/update-desktop-file-unity-webapps-gmail.py 2014-03-07 01:12:40 +0000
3+++ scripts/update-desktop-file-unity-webapps-gmail.py 2015-04-15 03:51:18 +0000
4@@ -1,15 +1,12 @@
5-#!/usr/bin/python
6-from gi.repository import Gio
7+#!/usr/bin/python3
8+from gi.repository import GLib
9 import os
10-import glib
11-import glob
12-import re
13
14 APP_ID = 'Gmailmailgooglecom'
15 DESKTOP_FILENAMES = ['Gmailmailgooglecom.desktop', 'GMailmailgooglecom.desktop']
16
17 def get_local_applications_path():
18- return os.path.join(glib.get_user_data_dir(), 'applications')
19+ return os.path.join(GLib.get_user_data_dir(), 'applications')
20
21 def update_desktop_file_startupwmclass():
22 local_applications_path = get_local_applications_path()
23@@ -27,8 +24,8 @@
24 start_idx += len('[Desktop Entry]')
25 updated_desktop_file_content = desktop_file_content[:start_idx] + '\nStartupWMClass={0}'.format(APP_ID) + desktop_file_content[start_idx:]
26 open(desktop_filename, "w+").write(updated_desktop_file_content)
27- except Exception, e:
28- print 'Error while upgrading the desktop file: ', str(e)
29+ except Exception as e:
30+ print('Error while upgrading the desktop file: ', str(e))
31
32 if __name__ == "__main__":
33 update_desktop_file_startupwmclass()

Subscribers

People subscribed via source and target branches

to all changes: