Skip to content
Permalink
Browse files

better error messages + default option where generating latex (sphinx)

  • Loading branch information...
sdpython committed Mar 30, 2015
1 parent 3181985 commit a4558ee3908db6adfba122e625c7eb4dac385d7b
@@ -97,18 +97,20 @@ def set_sphinx_variables(fileconf,
latex_elements = {'papersize': 'a4', 'pointsize': '10pt',
# 'preamble': '',
}
latex_use_parts = False
latex_documents = [('index', '%s_doc.tex' % project_var_name,
'%s Documentation' % project_var_name, author, 'manual'), ]
'%s' % project_var_name, author, 'manual', True), ]
man_pages = [('index', '%s_doc' % project_var_name,
'%s Documentation' % project_var_name, [author], 1)]
texinfo_documents = [('index',
'%s_documentation' % project_var_name,
'%s Documentation' % project_var_name,
'%s' % project_var_name,
author,
'%s documentation' % project_var_name,
description_latex,
'Miscellaneous'),
]
latex_show_pagerefs = True

# theme
html_theme = theme
@@ -134,8 +136,6 @@ def set_sphinx_variables(fileconf,
exclude_patterns = []
html_show_sphinx = False
html_show_copyright = False
latex_use_parts = True
latex_show_pagerefs = True
__html_last_updated_fmt_dt = datetime.datetime.now()
html_last_updated_fmt = '%04d-%02d-%02d' % (
__html_last_updated_fmt_dt.year,
@@ -223,7 +223,7 @@ def get_repo_log(path=None, file_detail=False, commandline=True):
if len(err) > 0:
fLOG("problem with file ", path, err)
raise Exception(
err + "\nCMD:\n" + cmd + "\nOUT:\n" + out + "\nERR:\n" + err)
err + "\nCMD:\n" + cmd + "\nOUT:\n" + out + "\nERR:\n" + err + "\nCMD:\n" + cmd)

master = get_master_location(path, commandline)
if master.endswith(".git"):
@@ -304,7 +304,7 @@ def get_repo_version(path=None, commandline=True, usedate=False, log=False):
if log:
fLOG("problem with file ", path, err)
if log:
return "OUT\n{0}\nERR:{1}".format(out, err)
return "OUT\n{0}\nERR:{1}\nCMD:\n{2}".format(out, err, cmd)
else:
raise Exception(err)

@@ -412,7 +412,7 @@ def get_nb_commits(path=None, commandline=True):

if len(err) > 0:
raise Exception(
"unable to get commit number from path {0}\nERR:\n{1}".format(path, err))
"unable to get commit number from path {0}\nERR:\n{1}\nCMD:\n{2}".format(path, err, cmd))

lines = out.strip()
try:
@@ -462,7 +462,8 @@ def clone(location,
cmd = "git clone " + address + " " + location
out, err = run_cmd(cmd, wait=True)
if len(err) > 0 and "Cloning into" not in err:
raise Exception("unable to clone {0}\nERR:\n{1}".format(address, err))
raise Exception(
"unable to clone {0}\nERR:\n{1}\nCMD:\n{2}".format(address, err, cmd))
return out, err


@@ -498,5 +499,6 @@ def rebase(location,
out, err = run_cmd(cmd, wait=True)
os.chdir(cwd)
if len(err) > 0 and "-> FETCH_HEAD" not in err:
raise Exception("unable to rebase {0}\nERR:\n{1}".format(address, err))
raise Exception(
"unable to rebase {0}\nERR:\n{1}\nCMD:\n{2}".format(address, err, cmd))
return out, err
@@ -279,7 +279,7 @@ def get_repo_version(path=None, commandline=True, log=False):
if log:
fLOG("problem with file ", path, err)
if log:
return "OUT\n{0}\nERR:{1}".format(out, err)
return "OUT\n{0}\nERR:{1}\nCMD:\n{2}".format(out, err, cmd)
else:
raise Exception(err)
lines = out.split("\n")

0 comments on commit a4558ee

Please sign in to comment.
You can’t perform that action at this time.