changeset 521:c4432bd3cb9b

wip
author Jeff Hammel <jhammel@mozilla.com>
date Sat, 21 Sep 2013 14:31:04 -0700
parents 3281b9fe4433
children 33d7d276b1b9
files python/applyrealhard.py
diffstat 1 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/python/applyrealhard.py	Fri Sep 20 08:43:59 2013 -0700
+++ b/python/applyrealhard.py	Sat Sep 21 14:31:04 2013 -0700
@@ -28,20 +28,32 @@
 
 def main(args=sys.argv[1:]):
 
+    # parse command line args
     usage = '%prog [options]'
     parser = optparse.OptionParser(usage=usage, description=__doc__)
     parser.add_option('-d', '--directory', default=os.getcwd())
     options, args = parser.parse_args(args)
 
+    # sanity check
+    if not wiggle:
+        parser.error("Need wiggle")
+
     # get rejects
     rej = rejects(options.directory)
     if not rej:
         parser.error("No rejects")
     print 'rej:\n%s\n' % '\n'.join([' %s' % r for r in rej])
 
+    # get the originals
+    orig = []
     for r in rej:
         # find the corresponding file
-        pass
+        o = r.rsplit('.rej')[0]
+        if not os.path.exists(o):
+            parser.error("%s not found")
+        orig.append(o)
+
+    # try to wiggle them
 
 if __name__ == '__main__':
     main()