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

Proposed by Justin McPherson
Status: Needs review
Proposed branch: lp:~justinmcp/unity-webapps-linkedin/fix-module-imports
Merge into: lp:unity-webapps-linkedin
Diff against target: 35 lines (+6/-9)
1 file modified
scripts/update-desktop-file-unity-webapps-linkedin.py (+6/-9)
To merge this branch: bzr merge lp:~justinmcp/unity-webapps-linkedin/fix-module-imports
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
WebApps Pending
Review via email: mp+256079@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)
70. 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

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

Update to python 3

69. 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-linkedin.py'
2--- scripts/update-desktop-file-unity-webapps-linkedin.py 2013-09-24 16:17:21 +0000
3+++ scripts/update-desktop-file-unity-webapps-linkedin.py 2015-04-15 03:48:25 +0000
4@@ -1,14 +1,11 @@
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 = 'LinkedInlinkedincom'
15
16 def get_local_applications_path():
17- return os.path.join(glib.get_user_data_dir(), 'applications')
18+ return os.path.join(GLib.get_user_data_dir(), 'applications')
19
20 def update_desktop_file_startupwmclass():
21 local_applications_path = get_local_applications_path()
22@@ -26,9 +23,9 @@
23 start_idx += len('[Desktop Entry]')
24 updated_desktop_file_content = desktop_file_content[:start_idx] + '\nStartupWMClass={0}'.format(APP_ID) + desktop_file_content[start_idx:]
25 open(desktop_filename, "w+").write(updated_desktop_file_content)
26- except Exception, e:
27- print 'Error while upgrading the desktop file: ', str(e)
28+ except Exception as e:
29+ print('Error while upgrading the desktop file: ', str(e))
30
31 if __name__ == "__main__":
32 update_desktop_file_startupwmclass()
33-
34\ No newline at end of file
35+

Subscribers

People subscribed via source and target branches

to all changes: