Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
awit-backstep
awit-backstep-traceback
Commits
2fe28c8f
Commit
2fe28c8f
authored
Sep 13, 2021
by
Nigel Kukard
Browse files
Merge branch 'remove-ast' into 'master'
Remove ast and load using JSON loader See merge request
!49
parents
2567510c
2d0ab2f5
Pipeline
#6660
passed with stages
in 42 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
scripts/backstep-traceback-auto
View file @
2fe28c8f
...
@@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
...
@@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
"""
import
argparse
import
argparse
import
ast
import
configparser
import
configparser
from
datetime
import
datetime
from
datetime
import
datetime
import
json
import
json
...
@@ -68,7 +67,7 @@ else:
...
@@ -68,7 +67,7 @@ else:
if
os
.
path
.
exists
(
JSON_FILE
):
if
os
.
path
.
exists
(
JSON_FILE
):
with
open
(
JSON_FILE
,
encoding
=
"utf8"
)
as
json_file
:
with
open
(
JSON_FILE
,
encoding
=
"utf8"
)
as
json_file
:
json_dict
=
json
.
load
(
json_file
)
json_dict
=
json
.
load
s
(
json_file
)
PERIOD
=
json_dict
[
"period"
]
PERIOD
=
json_dict
[
"period"
]
lv_list
=
json_dict
[
"lv_list"
]
lv_list
=
json_dict
[
"lv_list"
]
...
@@ -149,7 +148,7 @@ else:
...
@@ -149,7 +148,7 @@ else:
syncopts
.
append
(
"--bwlimit="
+
str
(
bwlimit
))
syncopts
.
append
(
"--bwlimit="
+
str
(
bwlimit
))
if
not
lv_list
:
if
not
lv_list
:
lv_list
=
ast
.
literal_eval
(
config
.
get
(
PERIOD
,
"backup_lvs"
))
lv_list
=
json
.
loads
(
config
.
get
(
PERIOD
,
"backup_lvs"
))
stack_dict
=
{}
stack_dict
=
{}
...
...
Write
Preview
Supports
Markdown
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