Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ai
cam
Commits
f0fff496
Commit
f0fff496
authored
Aug 02, 2006
by
ale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check for existance of configuration file.
parent
e1c1725d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
lib/cfg.py
lib/cfg.py
+9
-1
No files found.
lib/cfg.py
View file @
f0fff496
...
...
@@ -5,8 +5,16 @@ import os, sys
import
ConfigParser
from
utils
import
*
cfg
=
ConfigParser
.
ConfigParser
()
config_file_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
sys
.
argv
[
0
]),
'config'
)
if
not
os
.
path
.
exists
(
config_file_path
):
print
'''
The configuration file '%s' does not exist.
Please create this file and fill in the configuration data
of your certificates so that 'cam' can operate.
'''
sys
.
exit
(
1
)
cfg
=
ConfigParser
.
ConfigParser
()
cfg
.
read
(
config_file_path
)
ca
=
cfg2dict
(
cfg
,
'ca'
)
ca_base
=
cfg
.
get
(
'global'
,
'root'
)
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