Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

better ui

  • Loading branch information...
commit b61565987e7a9f379f0a873a884437063b9e8d77 1 parent 0f91947
Johannes Staffans authored
Showing with 10 additions and 5 deletions.
  1. +10 −5 robotbatch.py
View
15 robotbatch.py
@@ -42,7 +42,7 @@ def print_usage():
bs = batchsplitter.BatchSplitter(d.get_durations())
bs.split(num_batches)
- print 'BATCHES:'
+ print '\nBATCHES:'
print '--------'
batches = bs.get_batch_durations()
@@ -54,12 +54,13 @@ def print_usage():
if suites_to_batches[suite] == batch:
print ' %s' % suite
- print "\nNow scanning directories ...\n"
+ robot_dir = sys.argv[2]
+ print "\nNow scanning %s ...\n" % robot_dir
dirs_to_batches = {}
unknown_dirs = []
- for dirname, dirnames, filenames in os.walk(sys.argv[2]):
+ for dirname, dirnames, filenames in os.walk(robot_dir):
for subdirname in dirnames:
current_dir = os.path.join(dirname,subdirname)
current_dir_batch = False
@@ -82,8 +83,12 @@ def print_usage():
print '------------------------------------------------------\n'
- print "Assigning directories to batches via __init__.txt files"
- print "(old __init__.txt files will be backed up) ...\n"
+ print "Ready to assign directories to batches via __init__.txt files."
+ print "Old __init__.txt files will be backed up and overwritten."
+ print "Target directory is %s." % robot_dir
+ update_init_files = raw_input("Continue? [y/N]: ").strip()
+ if update_init_files.lower() != "y":
+ exit()
for suite_dir in dirs_to_batches:
init_file = os.sep.join([suite_dir, '__init__.txt'])
Please sign in to comment.
Something went wrong with that request. Please try again.