Merge lp:~dholbach/help-app/prerequisites into lp:~ubuntu-touch-coreapps-drivers/help-app/trunk

Proposed by Daniel Holbach
Status: Merged
Merged at revision: 57
Proposed branch: lp:~dholbach/help-app/prerequisites
Merge into: lp:~ubuntu-touch-coreapps-drivers/help-app/trunk
Diff against target: 32 lines (+11/-1)
1 file modified
edit-here/ (+11/-1)
To merge this branch: bzr merge lp:~dholbach/help-app/prerequisites
Reviewer Review Type Date Requested Status
Daniel Holbach (community) Approve
Nicholas Skaggs (community) Needs Fixing
Review via email:

Description of the change

Give more information and fail more gently if prerequisites like po4a or polib are missing.

To post a comment you must log in.
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

One minor tweak

review: Needs Fixing
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

There is an unrelated issue with the HACKING doc, I'll ask you to sneak in:

You can find the updated HTML in ./app/www/. For instance, you can browse
the site in firefox with

firefox app/www/index.html

^^ This is incorrect now. We could say

firefox app/www/index.en-us.html


firefox app/www/index*.html

or remove the specific recommendation.

lp:~dholbach/help-app/prerequisites updated
58. By Daniel Holbach

use shutil.which(), thanks Nick!

Revision history for this message
Daniel Holbach (dholbach) wrote :

app/www/index.html will be re-added through 1425025.

Revision history for this message
Daniel Holbach (dholbach) wrote :

<dholbach> balloons, the index.html will come back
 in fact I pushed a small branch to start work on bug 1425025
<ubot5> bug 1425025 in Help for Ubuntu for devices "Automatically load translated pages according to the user language" [High,Triaged]
<dholbach> can I merge the prerequisites branch now?
<balloons> dholbach, yep go for it

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'edit-here/'
2--- edit-here/ 2015-02-26 11:59:36 +0000
3+++ edit-here/ 2015-02-26 15:56:37 +0000
4@@ -2,10 +2,17 @@
5 import copy
6 import glob
7 import os
8-import polib
9 import re
10 import shutil
11 import subprocess
12+import sys
15+ import polib
16+except ImportError:
17+ print('Missing prerequisites. Please run: '
18+ '"sudo apt install python3-polib"')
19+ sys.exit(1)
21 from pelicanconf import PATH
23@@ -27,6 +34,9 @@
24 '-M', 'utf-8',
25 ]
26 self.pot_file = pot_file
27+ if not shutil.which('po4a'):
28+ print('Missing prerequisites. Please run: "sudo apt install po4a"')
29+ sys.exit(1)
31 def run(self, po4a_command, additional_args, with_output=False):
32 args = copy.copy(self.default_args)


People subscribed via source and target branches