savoirfairelinux-openerp team mailing list archive
-
savoirfairelinux-openerp team
-
Mailing list archive
-
Message #00939
[Merge] lp:~savoirfairelinux-openerp/lp-community-utils/progressbar into lp:lp-community-utils
Sandy Carter (http://www.savoirfairelinux.com) has proposed merging lp:~savoirfairelinux-openerp/lp-community-utils/progressbar into lp:lp-community-utils.
Requested reviews:
OpenERP Community Reviewer/Maintainer (openerp-community-reviewer)
For more details, see:
https://code.launchpad.net/~savoirfairelinux-openerp/lp-community-utils/progressbar/+merge/205252
Adds a progressbar in the console output since this script takes a long time.
--
https://code.launchpad.net/~savoirfairelinux-openerp/lp-community-utils/progressbar/+merge/205252
Your team Savoir-faire Linux' OpenERP is subscribed to branch lp:~savoirfairelinux-openerp/lp-community-utils/progressbar.
=== modified file 'README.rst'
--- README.rst 2013-09-22 14:36:16 +0000
+++ README.rst 2014-02-06 20:04:54 +0000
@@ -8,6 +8,7 @@
Other versions of Python have not been tested.
The launchpadlib_ egg is required.
+The progressbar_ library is optional but allows to display progress
Usage
-----
@@ -61,5 +62,6 @@
.. _launchpadlib: http://pypi.python.org/pypi/launchpadlib/1.10.2
+.. _progressbar: https://pypi.python.org/pypi/progressbar/2.2
.. _lazr.restfulclient: https://launchpad.net/lazr.restfulclient
.. _lazr.restfulclient bug report: https://bugs.launchpad.net/lazr.restfulclient/+bug/1094253
=== modified file 'openerp-nag'
--- openerp-nag 2013-09-22 14:36:16 +0000
+++ openerp-nag 2014-02-06 20:04:54 +0000
@@ -46,6 +46,10 @@
import datetime
import logging
+try:
+ from progressbar import ProgressBar
+except ImportError:
+ ProgressBar = None
from launchpadlib.launchpad import Launchpad
@@ -227,7 +231,9 @@
# Find things to nag about
nags = []
- for project_name in project_names:
+ progress = ProgressBar() if ProgressBar else list
+ print("Looking for things to nag about...")
+ for project_name in progress(project_names):
logging.info("Looking for things to nag about under %s", project_name)
nags.extend(gen_project_nags(lp, policy, project_name))
nags.sort(key=lambda nag: (nag.sort_class, nag.sort_priority,
Follow ups