Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
piphone
piphone-sip
Commits
a7c52b5e
Commit
a7c52b5e
authored
Jan 23, 2017
by
okhin
Browse files
Fixing the args parse part of the code
parent
85ec8a70
Pipeline
#780
passed with stage
in 2 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
piphone.py
View file @
a7c52b5e
...
...
@@ -27,9 +27,10 @@ config = configparser.ConfigParser()
arg_parser
.
add_argument
(
'-c'
,
'--config'
,
help
=
"Config file"
)
args
=
arg_parser
.
parse_args
()
try
:
logging
.
debug
(
"Let's use {} as a config file"
.
config
(
arg_parser
.
config
,))
logging
.
debug
(
"Let's use {} as a config file"
.
format
(
args
.
config
,))
config
.
read
(
args
.
config
)
except
AttributeError
:
except
AttributeError
as
e
:
print
(
e
)
try
:
if
os
.
path
.
isfile
(
'config.ini'
):
logging
.
debug
(
"Let's use config.ini as a config file"
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment