aboutsummaryrefslogtreecommitdiff
path: root/broadcast.py
diff options
context:
space:
mode:
authorGraham Northup <grissess@nexusg.org>2018-10-10 19:31:05 -0400
committerGraham Northup <grissess@nexusg.org>2018-10-10 19:31:05 -0400
commit0cf3c6721456258219f627657c04982c7d49d159 (patch)
tree426772d05c62e515001c153f8247b9fa168174a8 /broadcast.py
parent5afaac2cda949243a98849f6bf7c217a61fbc8e3 (diff)
added compressions for IV files
Diffstat (limited to 'broadcast.py')
-rw-r--r--broadcast.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/broadcast.py b/broadcast.py
index bd607ca..d554e97 100644
--- a/broadcast.py
+++ b/broadcast.py
@@ -456,7 +456,15 @@ for fname in args:
print 'PCM: exit'
continue
try:
- iv = ET.parse(fname).getroot()
+ if fname.endswith('.ivz'):
+ import gzip
+ ivf = gzip.open(fname, 'rb')
+ elif fname.endswith('.ivb'):
+ import bz2
+ ivf = bz2.BZ2File(fname, 'r')
+ else:
+ ivf = open(fname, 'rb')
+ iv = ET.parse(ivf).getroot()
except IOError:
import traceback
traceback.print_exc()