aboutsummaryrefslogtreecommitdiffstats
path: root/genericparser/packages/biz/common.py
diff options
context:
space:
mode:
authoryangyan <yangyanyj@chinamobile.com>2019-04-30 15:59:45 +0800
committerYan Yang <yangyanyj@chinamobile.com>2019-04-30 08:25:47 +0000
commit52a969dcc2a935930a559b1780d7c95e1cc45d73 (patch)
treeb95f60a4c719a0a24b5343f09fe17cb6fe060666 /genericparser/packages/biz/common.py
parent63c392e9cca3c6654e8383f49e5136fa86d1c72a (diff)
code refactor for genericparser1.0.0
Change-Id: I68a128944cde015d767576fc4e159d67db2d6b5d Issue-ID: VFC-1372 Signed-off-by: yangyan <yangyanyj@chinamobile.com>
Diffstat (limited to 'genericparser/packages/biz/common.py')
-rw-r--r--genericparser/packages/biz/common.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/genericparser/packages/biz/common.py b/genericparser/packages/biz/common.py
index be5627e..9b72b63 100644
--- a/genericparser/packages/biz/common.py
+++ b/genericparser/packages/biz/common.py
@@ -45,7 +45,7 @@ def read(file_path, start, end):
def parse_file_range(file_path, file_range):
start, end = 0, os.path.getsize(file_path)
if file_range:
- [start, end] = file_range.split('-')
- start, end = start.strip(), end.strip()
- start, end = int(start), int(end)
+ [start, range_end] = file_range.split('-')
+ range_end = range_end.strip() if range_end.strip() else end
+ start, end = int(start.strip()), int(range_end)
return start, end