If action is tidy then don't bother hecking if TO_DIR is valid.

This commit is contained in:
Sean Hammond 2010-06-15 20:42:44 +01:00
parent df153565d4
commit 58ea1d15f3

View File

@ -179,6 +179,10 @@ if __name__ == "__main__":
print usage()
sys.exit(2)
if ACTION == 'tidy':
tidy(FROM_DIR)
else:
try:
TO_DIR = sys.argv[3]
except IndexError:
@ -192,8 +196,6 @@ if __name__ == "__main__":
if ACTION == 'link':
link(FROM_DIR,TO_DIR)
elif ACTION == 'tidy':
tidy(FROM_DIR)
elif ACTION == 'report':
link(FROM_DIR,TO_DIR,report=True)
tidy(FROM_DIR,report=True)