Project

General

Profile

« Previous | Next » 

Revision 76bbab9d

Added by David Sorber over 11 years ago

Well that is one of the things I don't like about Python. You can silently corrupt a namespace and have no idea about it until your code actually runs. This should fix the issue for now.

View differences:

software/fiemap_testing/extent_test.py
elpased = end - start
hours, remainder = divmod(elpased.seconds, 3600)
minutes, seconds = divmod(remainder, 60)
time = '{:02d}:{:02d}:{:02d}'.format(hours, minutes, seconds)
self.out('Filler took: {:s}'.format(time))
time_str = '{:02d}:{:02d}:{:02d}'.format(hours, minutes, seconds)
self.out('Filler took: {:s}'.format(time_str))
# Wait for 30 seconds for any delayed actions to resolve
time.sleep(30)
......
return -1
# Create output folder if it does not already exist
output_path = os.path.join(output_path, fs_name)
date_str = datetime.datetime.now().strftime('%Y%m%d-%H%M')
output_path = os.path.join(output_path, fs_name, date_str)
if os.path.exists(output_path):
print 'ERROR: output folder "{:s}" already exists!'.format(output_path)
return -1

Also available in: Unified diff