Subversion Repositories programming

Compare Revisions

Ignore whitespace Rev 131 → Rev 132

/shell_programs/rarslave.py
135,7 → 135,7
# and extract itself, if possible.
################################################################################
 
import os, glob
import os, glob, re
 
class parset:
def __init__(self, par_filename):
238,8 → 238,10
os.remove(i)
 
# remove any rars that are associated (leave EVERYTHING else)
# This regex matches both old and new style rar(s).
regex = re.compile('^.*\.(rar|r\d\d)$')
for i in self.files:
if i[-3:] == 'rar':
if regex.match(i):
os.remove(i)
 
# remove any .0?? files (from parjoin)
325,8 → 327,12
parsets = []
 
for i in par2files:
filenames = get_par2_filenames(i)
create_new = True
try:
filenames = get_par2_filenames(i)
create_new = True
except EnvironmentError:
print 'CORRUPT PARFILE: %s' % (i, )
continue
 
# if we already have an instance for this set, append
# this par file to the extra_pars field