aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Northup <grissess@nexusg.org>2018-10-10 19:36:06 -0400
committerGraham Northup <grissess@nexusg.org>2018-10-10 19:36:06 -0400
commit1a64df3ce3929739ddddff447933297dafae9aa9 (patch)
tree81cc568561a3f8845a7a4eb96c5a3b5c4eebb810
parent0cf3c6721456258219f627657c04982c7d49d159 (diff)
fixed --compressions
-rw-r--r--mkiv.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/mkiv.py b/mkiv.py
index f409024..cd60927 100644
--- a/mkiv.py
+++ b/mkiv.py
@@ -109,10 +109,6 @@ had been specified, again containing only the programs that were observed in the
Groups for which no streams are generated are not written to the resulting file.'''
exit()
-if not args:
- parser.print_usage()
- exit()
-
COMPRESSIONS = {}
def compression(name, desc='Not described.'):
def inner(f):
@@ -123,12 +119,12 @@ def compression(name, desc='Not described.'):
def comp_none(bn):
return open(bn + '.iv', 'wb')
-@compression('gzip', 'GZip compression')
+@compression('gzip', 'GZip compression (.ivz format)')
def comp_gzip(bn):
import gzip
return gzip.open(bn + '.ivz', 'wb')
-@compression('bz2', 'BZip2 compression')
+@compression('bz2', 'BZip2 compression (.ivb format)')
def comp_bz2(bn):
import bz2
return bz2.BZ2File(bn + '.ivb', 'w')
@@ -136,7 +132,11 @@ def comp_bz2(bn):
if options.compressions:
for nm, tp in COMPRESSIONS.iteritems():
f, desc = tp
- print(nm, ':', desc)
+ print nm, ':', desc
+ exit()
+
+if not args:
+ parser.print_usage()
exit()
opener = COMPRESSIONS[options.compression][0]