Bugfix: MAX_PARALLEL_SECTIONS should not be None, even if not given on command line.

This commit is contained in:
Dimitri Fontaine 2010-04-07 14:11:10 +02:00
parent efa4b6b103
commit 38c8a079f2
4 changed files with 19 additions and 6 deletions

View File

@ -58,7 +58,7 @@ doc: man html todo bugs
clean:
rm -f *.xml *.html *.1 *~
deb:
prepare-deb:
# working copy from where to make the .orig archive
rm -rf $(DEBDIR)
mkdir -p $(DEBDIR)/pgloader-$(VERSION)
@ -72,14 +72,24 @@ deb:
done
# prepare the .orig without the debian/ packaging stuff
cp -a $(EXPORT) $(DEBDIR)
rsync -Ca $(EXPORT) $(DEBDIR)
rm -rf $(DEBDIR)/pgloader-$(VERSION)/debian
(cd $(DEBDIR) && tar czf $(ORIG) pgloader-$(VERSION))
# have a copy of the $ORIG file named $ARCHIVE for non-debian packagers
cp $(ORIG) $(ARCHIVE)
# build the debian package and copy them to ..
debuild:
(cd $(EXPORT) && debuild)
debuild-unsign:
(cd $(EXPORT) && debuild -us -uc)
copy-package:
cp -a $(DEBDIR)/export/pgloader[_-]$(VERSION)* ..
cp -a $(ARCHIVE) ..
deb: prepare-deb debuild copy-package
deb-unsign: prepare-deb debuild-unsign copy-package

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
pgloader (2.3.3~dev1-1) unstable; urgency=low
pgloader (2.3.3~dev2-1) unstable; urgency=low
* Implement -f --field-sep to overwrite the default from command line
* Add support for filename arguments, which use defaults

View File

@ -214,6 +214,10 @@ def parse_options():
pgloader.options.SECTION_THREADS = opts.section_threads
pgloader.options.MAX_PARALLEL_SECTIONS = opts.parallel
if pgloader.options.MAX_PARALLEL_SECTIONS is None:
from pgloader.options import DEFAULT_MAX_PARALLEL_SECTIONS
pgloader.options.MAX_PARALLEL_SECTIONS = DEFAULT_MAX_PARALLEL_SECTIONS
pgloader.options.INPUT_ENCODING = opts.encoding
if opts.reformat_path:
@ -701,7 +705,6 @@ if __name__ == "__main__":
ret = load_data()
except Exception, e:
from pgloader.options import DEBUG
print DEBUG
if DEBUG:
raise
sys.stderr.write(str(e) + '\n')

View File

@ -2,7 +2,7 @@
#
# Some common options, for each module to get them
PGLOADER_VERSION = '2.3.3~dev1'
PGLOADER_VERSION = '2.3.3~dev2'
PSYCOPG_VERSION = None