-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recursively compute variables #263
Changes from 4 commits
dfd8fdb
592779e
5e2bd8b
4bce61d
bce0456
fa984dc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -154,9 +154,14 @@ def data_name_gfdl(name, domain, data_type, intvl_type, data_yr, | |
|
||
def dmget(files_list): | ||
"""Call GFDL command 'dmget' to access archived files.""" | ||
if isinstance(files_list, str): | ||
files_list = [files_list] | ||
|
||
archive_files = [] | ||
for f in files_list: | ||
if f.startswith('/archive'): | ||
archive_files.append(f) | ||
try: | ||
if isinstance(files_list, str): | ||
files_list = [files_list] | ||
subprocess.call(['dmget'] + files_list) | ||
subprocess.call(['dmget'] + archive_files) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was finding that the test suite would hang if |
||
except OSError: | ||
logging.debug('dmget command not found in this machine') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, good suggestion to add a test for this. One minor change and things work smoothly!