Skip to content

Commit

Permalink
update documentation and style
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Dec 24, 2016
1 parent ffc8b3b commit 016c239
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -303,3 +303,4 @@ _unittests/ut_challenge/*.shx
_unittests/ut_challenge/*.dbf
_unittests/ut_challenge/*.zip

_doc/sphinxdoc/source/phdoc_static/style_notebook_snippet.css
4 changes: 2 additions & 2 deletions _doc/sphinxdoc/source/conf.py
Expand Up @@ -20,7 +20,7 @@
"pyquickhelper",
"src")))

from pyquickhelper.helpgen.default_conf import set_sphinx_variables
from pyquickhelper.helpgen.default_conf import set_sphinx_variables, get_default_stylesheet

set_sphinx_variables(__file__, "ensae_projects", "ENSAE", 2016,
"alabaster", # "sphinx_py3doc_enhanced_theme",
Expand All @@ -35,5 +35,5 @@
blog_background = False

html_context = {
'css_files': ['_static/my-styles.css'],
'css_files': get_default_stylesheet() + ['_static/my-styles.css'],
}
11 changes: 7 additions & 4 deletions src/ensae_projects/data/croix_rouge.py
Expand Up @@ -29,10 +29,13 @@ def get_password_from_keyring_or_env(pwd):
if pwd is None:
import keyring
pwd = keyring.get_password("HACKATHON2015", "PWDCROIXROUGE")
if pwd is None and "PWDCROIXROUGE" not in os.environ:
raise PasswordException(
"password not found in environment variables: PWDCROIXROUGE is not set")
return bytes(os.environ["PWDCROIXROUGE"], encoding="ascii")
if pwd is None:
if "PWDCROIXROUGE" not in os.environ:
raise PasswordException(
"password not found in environment variables: PWDCROIXROUGE is not set")
else:
pwd = os.environ["PWDCROIXROUGE"]
return bytes(pwd, encoding="ascii")
elif not isinstance(pwd, bytes):
return bytes(pwd, encoding="ascii")
else:
Expand Down

0 comments on commit 016c239

Please sign in to comment.