Add support for Join sets where the parity protects the split files
[rarslave2.git] / rarslave.py
index 1a7e4bc..20c0288 100755 (executable)
@@ -43,7 +43,7 @@ import PAR2Set
 class RarslaveConfig(object):
 
     DEFAULT_CONFIG_FILE = PAR2Set.utils.absolutePath(
-        os.path.join('~', '.config', 'rarslave2', 'rarslave2.conf'))
+        os.path.join('~', '.config', 'rarslave', 'rarslave.conf'))
 
     def __init__(self, fileName=DEFAULT_CONFIG_FILE):
 
@@ -269,6 +269,7 @@ def findUniqueSets(directory, files):
 def runEachType(cs, options):
 
     types = (
+        PAR2Set.JoinProtected,
         PAR2Set.Join,
         PAR2Set.ZIP,
         PAR2Set.OldRAR,
@@ -323,8 +324,12 @@ def runDirectory(directory, files, options):
     for cs in sets:
         try:
             runEachType(cs, options)
-        except:
+        except Exception, e:
+            import traceback
             logging.error('Unknown Exception: %s' % cs.parityFile)
+            logging.error('===== BEGIN Bactrace =====')
+            [logging.error(l) for l in traceback.format_exc(e).split('\n')]
+            logging.error('===== END Bactrace =====')
 
 ################################################################################