#14055: Fix sage-cleaner
----------------------------------+-----------------------------------------
Reporter: jdemeyer | Owner: leif
Type: defect | Status: needs_review
Priority: critical | Milestone: sage-5.9
Component: scripts | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers: John Palmieri, Leif
Leonhardy, Volker Braun
Authors: Jeroen Demeyer | Merged in:
Dependencies: | Stopgaps:
----------------------------------+-----------------------------------------
Comment (by jhpalmieri):
On a few systems that I tried, `os.environ['HOSTNAME']` returns a
!KeyError, even though `echo $HOSTNAME` returns something valid from the
command line.
Anyway, I'm guessing that we replace hyphens to get potentially valid
Python module names. This may be an artifact of the old doctesting code.
Should we patch env.py?
{{{
#!diff
diff --git a/sage/env.py b/sage/env.py
--- a/sage/env.py
+++ b/sage/env.py
@@ -30,7 +30,7 @@
SAGE_ENV = {
# system info
'UNAME' : os.uname()[0],
- 'HOSTNAME' :
socket.gethostname().replace('-','_').replace('/','_').replace('\\','_'),
+ 'HOSTNAME' : socket.gethostname()
'LOCAL_IDENTIFIER' : '$HOSTNAME.%s'%os.getpid(),
# bunch of sage directories and files
}}}
Or is that going to break things?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14055#comment:64>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.