Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
岳巧源
/
europa-erp-python
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0e4f556d
authored
Sep 21, 2024
by
larosa
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
add exception handle
parent
b4df46bb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
rs_data.py
rs_data.py
View file @
0e4f556d
...
@@ -216,6 +216,7 @@ if __name__ == '__main__':
...
@@ -216,6 +216,7 @@ if __name__ == '__main__':
os
.
makedirs
(
extract_dir
)
os
.
makedirs
(
extract_dir
)
"""unzip the zip file"""
"""unzip the zip file"""
try
:
file_handle
.
unzip
(
conf_environment
[
"tmp_file_path"
]
+
local_file_name_1
,
extract_dir
)
file_handle
.
unzip
(
conf_environment
[
"tmp_file_path"
]
+
local_file_name_1
,
extract_dir
)
file_handle
.
unzip
(
conf_environment
[
"tmp_file_path"
]
+
local_file_name_3
,
extract_dir
)
file_handle
.
unzip
(
conf_environment
[
"tmp_file_path"
]
+
local_file_name_3
,
extract_dir
)
...
@@ -227,8 +228,8 @@ if __name__ == '__main__':
...
@@ -227,8 +228,8 @@ if __name__ == '__main__':
sys
.
exit
(
"can't query the correct supplier id."
)
sys
.
exit
(
"can't query the correct supplier id."
)
handle_hk_csv
(
extract_dir
+
handle_file_name_1
,
conf_environment
,
rs_hk_supplier_id
)
handle_hk_csv
(
extract_dir
+
handle_file_name_1
,
conf_environment
,
rs_hk_supplier_id
)
handle_cn_csv
(
extract_dir
+
handle_file_name_3
,
conf_environment
,
rs_cn_supplier_id
)
handle_cn_csv
(
extract_dir
+
handle_file_name_3
,
conf_environment
,
rs_cn_supplier_id
)
except
Exception
as
e
:
print
(
e
)
"""remove the temp file, close the connection"""
"""remove the temp file, close the connection"""
remove
(
extract_dir
+
handle_file_name_1
)
remove
(
extract_dir
+
handle_file_name_1
)
remove
(
extract_dir
+
handle_file_name_3
)
remove
(
extract_dir
+
handle_file_name_3
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment