Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Chenhao Ma
core
Commits
9c503ec3
Commit
9c503ec3
authored
11 years ago
by
Gunnar Schaefer
Browse files
Options
Downloads
Patches
Plain Diff
minor improvement to private key handling
parent
1fe72616
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nimsapi.py
+5
-5
5 additions, 5 deletions
nimsapi.py
with
5 additions
and
5 deletions
nimsapi.py
+
5
−
5
View file @
9c503ec3
...
...
@@ -447,6 +447,7 @@ app.config = dict(stage_path='', site_id=None, privkey=None)
if
__name__
==
'
__main__
'
:
import
sys
import
paste.httpserver
args
=
ArgumentParser
().
parse_args
()
...
...
@@ -456,17 +457,16 @@ if __name__ == '__main__':
try
:
privkey
=
Crypto
.
PublicKey
.
RSA
.
importKey
(
open
(
args
.
privkey
).
read
())
except
:
log
.
warning
(
args
.
privkey
+
'
is not a valid private SSL key file
'
)
privkey
=
None
log
.
warning
(
args
.
privkey
+
'
is not a valid private SSL key file
, bailing out
'
)
sys
.
exit
(
1
)
else
:
log
.
info
(
'
successfully loaded private SSL key from
'
+
args
.
privkey
)
app
.
config
[
'
privkey
'
]
=
privkey
else
:
log
.
warning
(
'
private SSL key not specified: internims functionality disabled
'
)
privkey
=
None
log
.
warning
(
'
private SSL key not specified, internims functionality disabled
'
)
app
.
config
[
'
stage_path
'
]
=
args
.
stage_path
app
.
config
[
'
site_id
'
]
=
args
.
uid
app
.
config
[
'
privkey
'
]
=
args
.
privkey
app
.
db
=
(
pymongo
.
MongoReplicaSetClient
(
args
.
uri
)
if
'
replicaSet
'
in
args
.
uri
else
pymongo
.
MongoClient
(
args
.
uri
)).
get_default_database
()
paste
.
httpserver
.
serve
(
app
,
port
=
'
8080
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment