Skip to content
Snippets Groups Projects
Commit 1d15e270 authored by Anne Philipp's avatar Anne Philipp
Browse files

bug fix for missing variable in subfunction

parent de4dc27d
Branches
Tags
No related merge requests found
......@@ -148,7 +148,7 @@ def get_mars_data(c):
# if data are to be retrieved, clean up any old grib files
if c.request == 0 or c.request == 2:
remove_old('*grb')
remove_old('*grb', c.inputdir)
# -------------- flux data ------------------------------------------------
start, end, datechunk = mk_dates(c, fluxes=True)
......@@ -264,7 +264,7 @@ def mk_dates(c, fluxes):
return start, end, chunk
def remove_old(pattern):
def remove_old(pattern, inputdir):
'''Deletes old retrieval files matching the pattern.
Parameters
......@@ -272,13 +272,16 @@ def remove_old(pattern):
pattern : :obj:`string`
The sub string pattern which identifies the files to be deleted.
inputdir : :obj:`string`, optional
Path to the directory where the retrieved data is stored.
Return
------
'''
print('... removing old content of ' + c.inputdir)
print('... removing old content of ' + inputdir)
tobecleaned = UioFiles(c.inputdir, pattern)
tobecleaned = UioFiles(inputdir, pattern)
tobecleaned.delete_files()
return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment