Skip to content
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

Duplicate server type checking when the type is file #16

Open
indrarudianto opened this issue Oct 12, 2020 · 1 comment
Open

Duplicate server type checking when the type is file #16

indrarudianto opened this issue Oct 12, 2020 · 1 comment
Assignees

Comments

@indrarudianto
Copy link
Contributor

In the following lines:

REDPy/redpy/trigger.py

Lines 43 to 48 in 098495a

if opt.server == 'file':
# Generate list of files
if opt.server == 'file':
flist = list(itertools.chain.from_iterable(glob.iglob(os.path.join(
root,opt.filepattern)) for root, dirs, files in os.walk(opt.searchdir)))

In the line 43, it checks if opt.server equal to file. Then, in the line 46 it also checks the same thing.

Type hinting may also report flist in the line 53 is possibly unbound.

REDPy/redpy/trigger.py

Lines 50 to 55 in 098495a

# Determine which subset of files to load based on start and end times and
# station name; we'll fully deal with stations below
flist_sub = []
for f in flist:
# Load header only
stmp = obspy.read(f, headonly=True)

@ahotovec ahotovec self-assigned this Oct 16, 2020
@ahotovec
Copy link
Owner

Thanks for pointing this out. It's been a while since I've done housekeeping on these functions, and they've undergone a lot of changes the last few years.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants