Fix revision rendering and make use of ascii_letters.
This commit is contained in:
parent
c5c44f3e0c
commit
8dc51b9fb4
2 changed files with 6 additions and 9 deletions
|
|
@ -19,7 +19,6 @@ See www.evennia.com for full documentation.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
from builtins import object
|
|
||||||
|
|
||||||
# Delayed loading of properties
|
# Delayed loading of properties
|
||||||
|
|
||||||
|
|
@ -104,7 +103,10 @@ def _create_version():
|
||||||
except IOError as err:
|
except IOError as err:
|
||||||
print(err)
|
print(err)
|
||||||
try:
|
try:
|
||||||
version = "%s (rev %s)" % (version, check_output("git rev-parse --short HEAD", shell=True, cwd=root, stderr=STDOUT).strip())
|
rev = check_output(
|
||||||
|
"git rev-parse --short HEAD",
|
||||||
|
shell=True, cwd=root, stderr=STDOUT).strip().decode()
|
||||||
|
version = "%s (rev %s)" % (version, rev)
|
||||||
except (IOError, CalledProcessError):
|
except (IOError, CalledProcessError):
|
||||||
# ignore if we cannot get to git
|
# ignore if we cannot get to git
|
||||||
pass
|
pass
|
||||||
|
|
@ -314,8 +316,3 @@ def _init():
|
||||||
syscmdkeys = SystemCmds()
|
syscmdkeys = SystemCmds()
|
||||||
del SystemCmds
|
del SystemCmds
|
||||||
del _EvContainer
|
del _EvContainer
|
||||||
|
|
||||||
|
|
||||||
del object
|
|
||||||
del absolute_import
|
|
||||||
del print_function
|
|
||||||
|
|
|
||||||
|
|
@ -412,7 +412,7 @@ def evennia_version():
|
||||||
try:
|
try:
|
||||||
rev = check_output(
|
rev = check_output(
|
||||||
"git rev-parse --short HEAD",
|
"git rev-parse --short HEAD",
|
||||||
shell=True, cwd=EVENNIA_ROOT, stderr=STDOUT).strip()
|
shell=True, cwd=EVENNIA_ROOT, stderr=STDOUT).strip().decode()
|
||||||
version = "%s (rev %s)" % (version, rev)
|
version = "%s (rev %s)" % (version, rev)
|
||||||
except (IOError, CalledProcessError):
|
except (IOError, CalledProcessError):
|
||||||
# move on if git is not answering
|
# move on if git is not answering
|
||||||
|
|
@ -502,7 +502,7 @@ def create_secret_key():
|
||||||
"""
|
"""
|
||||||
import random
|
import random
|
||||||
import string
|
import string
|
||||||
secret_key = list((string.letters +
|
secret_key = list((string.ascii_letters +
|
||||||
string.digits + string.punctuation).replace("\\", "")
|
string.digits + string.punctuation).replace("\\", "")
|
||||||
.replace("'", '"').replace("{", "_").replace("}", "-"))
|
.replace("'", '"').replace("{", "_").replace("}", "-"))
|
||||||
random.shuffle(secret_key)
|
random.shuffle(secret_key)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue