[RARSLAVE] Enable production actions
authorIra W. Snyder <devel@irasnyder.com>
Tue, 26 Dec 2006 19:42:01 +0000 (11:42 -0800)
committerIra W. Snyder <devel@irasnyder.com>
Wed, 27 Dec 2006 04:25:26 +0000 (20:25 -0800)
Remove all of the non-production testing actions, and enable all of the
real actions, including running commands, deleting files, etc.

Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
rarslave.py

index 739fdc7..657fa72 100644 (file)
@@ -26,10 +26,7 @@ class RarslaveExtractor (object):
 
        def addHead (self, dir, head):
                assert os.path.isdir (dir)
-               # REQUIRES that the dir is valid, but not that the file is valid, so that
-               # we can move a file that doesn't exist yet.
-               # FIXME: probably CAN add this back, since we should be running this AFTER repair.
-               #assert os.path.isfile (os.path.join (dir, head))
+               assert os.path.isfile (os.path.join (dir, head))
 
                full_head = os.path.join (dir, head)
                logger.addMessage ('Adding extraction head: %s' % full_head, RarslaveLogger.MessageType.Debug)
@@ -173,12 +170,7 @@ def run_command (cmd, indir=None):
                assert os.path.isdir (indir) # MUST be a directory!
                os.chdir (indir)
 
-       # FIXME: re-enable this after testing
-       print 'RUNNING (%s): %s' % (indir, cmd)
-       return SUCCESS
-
-       # return os.system (cmd)
-
+       return os.system (cmd)
 
 def full_abspath (p):
        return os.path.abspath (os.path.expanduser (p))
@@ -439,9 +431,7 @@ def delete_list (files, interactive=False):
                        return SUCCESS
 
        for f in files:
-               # FIXME: re-enable this in production
-               # os.remove (f)
-               print 'rm \"%s\"' % f
+               os.remove (f)
 
        return SUCCESS