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 @@
...
@@ -11,6 +11,9 @@
"""Git implementation of _version.py."""
"""Git implementation of _version.py."""
from
__future__
import
print_function
from
__future__
import
print_function
from
builtins
import
str
from
builtins
import
range
from
builtins
import
object
import
errno
import
errno
import
os
import
os
import
re
import
re
...
@@ -31,7 +34,7 @@ def get_keywords():
...
@@ -31,7 +34,7 @@ def get_keywords():
return
keywords
return
keywords
class
VersioneerConfig
:
class
VersioneerConfig
(
object
)
:
"""Container for Versioneer configuration parameters."""
"""Container for Versioneer configuration parameters."""
...
...
kedifa/app.py
View file @
bdce9049
...
@@ -17,6 +17,11 @@
...
@@ -17,6 +17,11 @@
# See COPYING file for full licensing terms.
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
# 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
import
x509
from
cryptography.hazmat.primitives.serialization
import
Encoding
from
cryptography.hazmat.primitives.serialization
import
Encoding
from
threading
import
local
from
threading
import
local
...
@@ -33,7 +38,7 @@ import signal
...
@@ -33,7 +38,7 @@ import signal
import
sqlite3
import
sqlite3
import
ssl
import
ssl
import
string
import
string
import
urlparse
import
url
lib.
parse
import
logging
import
logging
import
logging.handlers
import
logging.handlers
...
@@ -361,7 +366,7 @@ class Kedifa(object):
...
@@ -361,7 +366,7 @@ class Kedifa(object):
parameters
=
{}
parameters
=
{}
if
qs
:
if
qs
:
try
:
try
:
parameters
=
urlparse
.
parse_qs
(
qs
,
strict_parsing
=
True
)
parameters
=
url
lib
.
parse
.
parse_qs
(
qs
,
strict_parsing
=
True
)
except
ValueError
:
except
ValueError
:
start_response
(
'400 Bad Request'
,
headers_text_plain
)
start_response
(
'400 Bad Request'
,
headers_text_plain
)
return
(
'Query string %r was not correct.'
%
(
qs
,
),)
return
(
'Query string %r was not correct.'
%
(
qs
,
),)
...
...
kedifa/cli.py
View file @
bdce9049
...
@@ -19,8 +19,10 @@ from __future__ import absolute_import
...
@@ -19,8 +19,10 @@ from __future__ import absolute_import
# See COPYING file for full licensing terms.
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
# See https://www.nexedi.com/licensing for rationale and options.
from
future
import
standard_library
standard_library
.
install_aliases
()
import
argparse
import
argparse
import
http
lib
import
http
.client
import
requests
import
requests
import
sys
import
sys
...
@@ -125,7 +127,7 @@ def getter(*args):
...
@@ -125,7 +127,7 @@ def getter(*args):
print
(
'%r not downloaded, problem %s'
%
(
url
,
e
))
print
(
'%r not downloaded, problem %s'
%
(
url
,
e
))
sys
.
exit
(
1
)
sys
.
exit
(
1
)
else
:
else
:
if
response
.
status_code
!=
http
lib
.
OK
:
if
response
.
status_code
!=
http
.
client
.
OK
:
print
(
'%r not downloaded, HTTP code %s'
%
(
print
(
'%r not downloaded, HTTP code %s'
%
(
url
,
response
.
status_code
))
url
,
response
.
status_code
))
sys
.
exit
(
1
)
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
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
json
import
os
import
os
import
requests
import
requests
...
@@ -57,7 +60,7 @@ class Updater(object):
...
@@ -57,7 +60,7 @@ class Updater(object):
print
(
'Certificate %r: problem with %r not downloaded: %s'
%
(
print
(
'Certificate %r: problem with %r not downloaded: %s'
%
(
certificate_file
,
url
,
e
))
certificate_file
,
url
,
e
))
else
:
else
:
if
response
.
status_code
!=
http
lib
.
OK
:
if
response
.
status_code
!=
http
.
client
.
OK
:
print
(
'Certificate %r: %r not downloaded, HTTP code %s'
%
(
print
(
'Certificate %r: %r not downloaded, HTTP code %s'
%
(
certificate_file
,
url
,
response
.
status_code
))
certificate_file
,
url
,
response
.
status_code
))
else
:
else
:
...
@@ -146,7 +149,7 @@ class Updater(object):
...
@@ -146,7 +149,7 @@ class Updater(object):
self
.
master_certificate_file
):
self
.
master_certificate_file
):
master_content
=
open
(
self
.
master_certificate_file
,
'r'
).
read
()
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
):
if
os
.
path
.
exists
(
certificate
):
continue
continue
if
fallback
and
os
.
path
.
exists
(
fallback
):
if
fallback
and
os
.
path
.
exists
(
fallback
):
...
@@ -176,7 +179,7 @@ class Updater(object):
...
@@ -176,7 +179,7 @@ class Updater(object):
except
IOError
:
except
IOError
:
pass
pass
for
certificate_file
in
self
.
mapping
.
keys
(
):
for
certificate_file
in
list
(
self
.
mapping
.
keys
()
):
if
self
.
updateCertificate
(
certificate_file
,
master_content
):
if
self
.
updateCertificate
(
certificate_file
,
master_content
):
updated
=
True
updated
=
True
...
...
versioneer.py
View file @
bdce9049
...
@@ -277,6 +277,11 @@ https://creativecommons.org/publicdomain/zero/1.0/ .
...
@@ -277,6 +277,11 @@ https://creativecommons.org/publicdomain/zero/1.0/ .
"""
"""
from
__future__
import
print_function
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
:
try
:
import
configparser
import
configparser
except
ImportError
:
except
ImportError
:
...
@@ -289,7 +294,7 @@ import subprocess
...
@@ -289,7 +294,7 @@ import subprocess
import
sys
import
sys
class
VersioneerConfig
:
class
VersioneerConfig
(
object
)
:
"""Container for Versioneer configuration parameters."""
"""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