Use exceptions for error handling
[rarslave2.git] / PAR2Set / ZIP.py
index 36acb74..39a83ff 100644 (file)
@@ -69,14 +69,5 @@ class ZIP (PAR2Set.Base.Base):
                   file -- the file to extract
                   todir -- the directory to extract into"""
 
-               ZIP_CMD = rsutil.common.config_get_value ('commands', 'unzip')
-
-               cmd = ZIP_CMD % (file, todir)
-               ret = rsutil.common.run_command (cmd)
-
-               # Check error code
-               if ret != 0:
-                       return -rsutil.common.EEXTRACT
-
-               return rsutil.common.SUCCESS
+               rsutil.common.run_command(['unzip', file], todir)