# vim: set ts=4 sts=4 sw=4 textwidth=92:
import PAR2Set.Base
-from RarslaveCommon import *
+import rsutil.common
#
# This is an new-style rar type
#
def detector (name_files, prot_files):
- return has_a_match ('^.*\.part0*1\.rar$', prot_files)
+ return rsutil.common.has_a_match ('^.*\.part0*1\.rar$', prot_files)
class NewRAR (PAR2Set.Base.Base):
return 'NEWRAR'
def find_extraction_heads (self):
- return find_matches ('^.*\.part0*1\.rar$', self.all_files)
+ return rsutil.common.find_matches ('^.*\.part0*1\.rar$', self.all_files)
def extraction_function (self, file, todir):
assert os.path.isfile (file)
assert os.path.isdir (todir)
- RAR_CMD = config_get_value ('commands', 'unrar')
+ RAR_CMD = rsutil.common.config_get_value ('commands', 'unrar')
cmd = '%s \"%s\"' % (RAR_CMD, file)
- ret = run_command (cmd, todir)
+ ret = rsutil.common.run_command (cmd, todir)
# Check error code
if ret != 0: