Skip to content

Duplicate server type checking when the type is file #16

@indrarudia

Description

@indrarudia

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)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions