[library-web] make it possible to pass multiple modules to rebuild on the command line
- From: Frederic Peters <fpeters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [library-web] make it possible to pass multiple modules to rebuild on the command line
- Date: Wed, 29 Jan 2014 15:55:52 +0000 (UTC)
commit 084410547f69f26ba2f1dc1a13d4c9ac53c24fe0
Author: Frédéric Péters <fpeters 0d be>
Date: Wed Jan 29 14:20:48 2014 +0000
make it possible to pass multiple modules to rebuild on the command line
src/app.py | 4 ++++
src/lgo.py | 19 ++++++++++---------
2 files changed, 14 insertions(+), 9 deletions(-)
---
diff --git a/src/app.py b/src/app.py
index e452c09..b481636 100644
--- a/src/app.py
+++ b/src/app.py
@@ -78,6 +78,10 @@ class App:
logging.getLogger().handlers[0].setFormatter(utils.LogFormatter())
self.debug = (self.options.verbose >= 5)
+ if self.options.rebuild_module:
+ self.rebuild_modules = [self.options.rebuild_module]
+ self.rebuild_modules.extend(args)
+
self.rebuild_all = self.options.rebuild_all
self.rebuild_language = self.options.rebuild_language
diff --git a/src/lgo.py b/src/lgo.py
index 1c7f6ab..0aa3ffa 100755
--- a/src/lgo.py
+++ b/src/lgo.py
@@ -141,15 +141,16 @@ class Lgo(App):
if self.options.rebuild_module:
self.rebuild_all = True
- if urlparse.urlparse(self.options.rebuild_module).scheme:
- filename = self.download(self.options.rebuild_module)
- if not filename:
- print >> sys.stderr, 'failed to get', self.options.rebuild_module
- sys.exit(1)
- else:
- filename = self.options.rebuild_module
- for doc_module in self.extract_modules(filename):
- doc_module.process()
+ for module in self.rebuild_modules:
+ if urlparse.urlparse(module).scheme:
+ filename = self.download(module)
+ if not filename:
+ print >> sys.stderr, 'failed to get', module
+ sys.exit(1)
+ else:
+ filename = module
+ for doc_module in self.extract_modules(filename):
+ doc_module.process()
sys.exit(0)
if self.options.rebuild_remote:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]