Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SOHViewer
Manage
Activity
Members
Labels
Plan
Issues
14
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software Public
PASSOFT
SOHViewer
Commits
905f6033
Commit
905f6033
authored
1 year ago
by
Lan Dam
Browse files
Options
Downloads
Patches
Plain Diff
Fix bug happen when select 2 folders with different type
parent
493ac1e3
No related branches found
Branches containing commit
No related tags found
1 merge request
!163
Fix bug happen when select 2 folders with different type
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sohstationviewer/controller/processing.py
+6
-2
6 additions, 2 deletions
sohstationviewer/controller/processing.py
with
6 additions
and
2 deletions
sohstationviewer/controller/processing.py
+
6
−
2
View file @
905f6033
...
...
@@ -7,7 +7,7 @@ import os
import
json
import
re
from
pathlib
import
Path
from
typing
import
List
,
Optional
,
Dict
,
Tuple
from
typing
import
List
,
Optional
,
Dict
,
Tuple
,
Union
from
PySide6.QtCore
import
QEventLoop
,
Qt
from
PySide6.QtGui
import
QCursor
...
...
@@ -167,7 +167,7 @@ def read_mseed_channels(tracking_box: QTextBrowser, list_of_dir: List[str],
return
channel_info
def
detect_data_type
(
list_of_dir
:
List
[
str
])
->
Optional
[
str
]:
def
detect_data_type
(
list_of_dir
:
List
[
Union
[
str
,
Path
]
])
->
Optional
[
str
]:
"""
Detect data type for the given directories using get_data_type_from_file
:param list_of_dir: list of directories selected by users
...
...
@@ -183,6 +183,10 @@ def detect_data_type(list_of_dir: List[str]) -> Optional[str]:
dir_data_type_dict
=
{}
is_multiplex_dict
=
{}
for
d
in
list_of_dir
:
try
:
d
=
d
.
as_posix
()
except
AttributeError
:
pass
data_type
=
"
Unknown
"
is_multiplex
=
None
for
path
,
subdirs
,
files
in
os
.
walk
(
d
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment