Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
juga
sbws
Commits
fb8544e0
Commit
fb8544e0
authored
Apr 27, 2018
by
Matt Traudt
Committed by
Matt Traudt
Apr 27, 2018
Browse files
Rename SBWS_VERSION to __version__
parent
e5ed6d34
Changes
4
Hide whitespace changes
Inline
Side-by-side
docs/source/conf.py
View file @
fb8544e0
...
...
@@ -16,7 +16,7 @@ import os
def
find_version
():
with
open
(
os
.
path
.
join
(
".."
,
".."
,
"sbws"
,
"__init__.py"
))
as
fp
:
for
line
in
fp
:
if
"
SBWS_VERSION
"
in
line
.
strip
():
if
"
__version__
"
in
line
.
strip
():
version
=
line
.
split
(
"="
,
1
)[
1
].
strip
().
strip
(
"'"
)
return
version
...
...
sbws/__init__.py
View file @
fb8544e0
import
os
SBWS_VERSION
=
'0.1.0'
__version__
=
'0.1.0'
RESULT_VERSION
=
1
WIRE_VERSION
=
1
SPEC_VERSION
=
'1.1.0'
...
...
sbws/lib/v3bwfile.py
View file @
fb8544e0
...
...
@@ -4,7 +4,7 @@
import
time
import
logging
from
sbws
import
SBWS_VERSION
,
SPEC_VERSION
from
sbws
import
__version__
,
SPEC_VERSION
log
=
logging
.
getLogger
(
__name__
)
...
...
@@ -21,7 +21,7 @@ class V3BwHeader(object):
:param str software_version: the version of the software
"""
def
__init__
(
self
,
timestamp
=
None
,
version
=
SPEC_VERSION
,
software
=
'sbws'
,
software_version
=
SBWS_VERSION
):
software_version
=
__version__
):
self
.
timestamp
=
timestamp
or
int
(
time
.
time
())
self
.
version
=
version
self
.
software
=
software
...
...
sbws/util/parser.py
View file @
fb8544e0
...
...
@@ -5,7 +5,7 @@ import sbws.core.init
import
sbws.core.pwgen
import
sbws.core.server
import
sbws.core.stats
from
sbws
import
SBWS_VERSION
from
sbws
import
__version__
from
argparse
import
ArgumentParser
,
ArgumentDefaultsHelpFormatter
import
os
...
...
@@ -20,7 +20,7 @@ def create_parser():
p
=
ArgumentParser
(
formatter_class
=
ArgumentDefaultsHelpFormatter
)
p
.
add_argument
(
'--version'
,
action
=
'version'
,
help
=
'sbws version'
,
version
=
'%(prog)s {}'
.
format
(
SBWS_VERSION
))
version
=
'%(prog)s {}'
.
format
(
__version__
))
p
.
add_argument
(
'--log-level'
,
choices
=
[
'DEBUG'
,
'INFO'
,
'WARNING'
,
'ERROR'
,
'CRITICAL'
],
help
=
'Override the sbws log level'
)
...
...
Write
Preview
Supports
Markdown
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