Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
kedifa
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Aurel
kedifa
Commits
bdce9049
Commit
bdce9049
authored
Oct 23, 2020
by
Aurel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
futurize: stage2
parent
ae0c991a
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
78 additions
and
55 deletions
+78
-55
kedifa/_version.py
kedifa/_version.py
+4
-1
kedifa/app.py
kedifa/app.py
+7
-2
kedifa/cli.py
kedifa/cli.py
+4
-2
kedifa/test.py
kedifa/test.py
+50
-45
kedifa/updater.py
kedifa/updater.py
+7
-4
versioneer.py
versioneer.py
+6
-1
No files found.
kedifa/_version.py
View file @
bdce9049
...
...
@@ -11,6 +11,9 @@
"""Git implementation of _version.py."""
from
__future__
import
print_function
from
builtins
import
str
from
builtins
import
range
from
builtins
import
object
import
errno
import
os
import
re
...
...
@@ -31,7 +34,7 @@ def get_keywords():
return
keywords
class
VersioneerConfig
:
class
VersioneerConfig
(
object
)
:
"""Container for Versioneer configuration parameters."""
...
...
kedifa/app.py
View file @
bdce9049
...
...
@@ -17,6 +17,11 @@
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
from
future
import
standard_library
standard_library
.
install_aliases
()
from
builtins
import
str
from
builtins
import
range
from
builtins
import
object
from
cryptography
import
x509
from
cryptography.hazmat.primitives.serialization
import
Encoding
from
threading
import
local
...
...
@@ -33,7 +38,7 @@ import signal
import
sqlite3
import
ssl
import
string
import
urlparse
import
url
lib.
parse
import
logging
import
logging.handlers
...
...
@@ -361,7 +366,7 @@ class Kedifa(object):
parameters
=
{}
if
qs
:
try
:
parameters
=
urlparse
.
parse_qs
(
qs
,
strict_parsing
=
True
)
parameters
=
url
lib
.
parse
.
parse_qs
(
qs
,
strict_parsing
=
True
)
except
ValueError
:
start_response
(
'400 Bad Request'
,
headers_text_plain
)
return
(
'Query string %r was not correct.'
%
(
qs
,
),)
...
...
kedifa/cli.py
View file @
bdce9049
...
...
@@ -19,8 +19,10 @@ from __future__ import absolute_import
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
from
future
import
standard_library
standard_library
.
install_aliases
()
import
argparse
import
http
lib
import
http
.client
import
requests
import
sys
...
...
@@ -125,7 +127,7 @@ def getter(*args):
print
(
'%r not downloaded, problem %s'
%
(
url
,
e
))
sys
.
exit
(
1
)
else
:
if
response
.
status_code
!=
http
lib
.
OK
:
if
response
.
status_code
!=
http
.
client
.
OK
:
print
(
'%r not downloaded, HTTP code %s'
%
(
url
,
response
.
status_code
))
sys
.
exit
(
1
)
...
...
kedifa/test.py
View file @
bdce9049
This diff is collapsed.
Click to expand it.
kedifa/updater.py
View file @
bdce9049
from
__future__
import
print_function
import
httplib
from
future
import
standard_library
standard_library
.
install_aliases
()
from
builtins
import
object
import
http.client
import
json
import
os
import
requests
...
...
@@ -57,7 +60,7 @@ class Updater(object):
print
(
'Certificate %r: problem with %r not downloaded: %s'
%
(
certificate_file
,
url
,
e
))
else
:
if
response
.
status_code
!=
http
lib
.
OK
:
if
response
.
status_code
!=
http
.
client
.
OK
:
print
(
'Certificate %r: %r not downloaded, HTTP code %s'
%
(
certificate_file
,
url
,
response
.
status_code
))
else
:
...
...
@@ -146,7 +149,7 @@ class Updater(object):
self
.
master_certificate_file
):
master_content
=
open
(
self
.
master_certificate_file
,
'r'
).
read
()
for
certificate
,
(
_
,
fallback
)
in
prepare_mapping
.
items
(
):
for
certificate
,
(
_
,
fallback
)
in
list
(
prepare_mapping
.
items
()
):
if
os
.
path
.
exists
(
certificate
):
continue
if
fallback
and
os
.
path
.
exists
(
fallback
):
...
...
@@ -176,7 +179,7 @@ class Updater(object):
except
IOError
:
pass
for
certificate_file
in
self
.
mapping
.
keys
(
):
for
certificate_file
in
list
(
self
.
mapping
.
keys
()
):
if
self
.
updateCertificate
(
certificate_file
,
master_content
):
updated
=
True
...
...
versioneer.py
View file @
bdce9049
...
...
@@ -277,6 +277,11 @@ https://creativecommons.org/publicdomain/zero/1.0/ .
"""
from
__future__
import
print_function
from
future
import
standard_library
standard_library
.
install_aliases
()
from
builtins
import
str
from
builtins
import
range
from
builtins
import
object
try
:
import
configparser
except
ImportError
:
...
...
@@ -289,7 +294,7 @@ import subprocess
import
sys
class
VersioneerConfig
:
class
VersioneerConfig
(
object
)
:
"""Container for Versioneer configuration parameters."""
...
...
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