edgy: hgwebdir.cgi crashes in posixpath.py line 62 with AttributeError: 'NoneType' object has no attribute 'endswith'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
hg |
Fix Released
|
Unknown
|
|||
mercurial (Debian) |
Fix Released
|
Unknown
|
|||
mercurial (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
Binary package hint: mercurial
Hello
I'm running edgy on AMD64 and mercurial version system (0.9-7)
The "server" hgwebdir.cgi crashes for me whatever I try to browse to on
http://
with this output
-------
AttributeError Python 2.4.4c0: /usr/bin/python
Sun Aug 20 01:37:47 2006
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
/home/
16 # Alternatively you can pass a list of ('virtual/path', '/real/path') tuples
17 # or use a dictionary with entries like 'virtual/path': '/real/path'
18
19 h = hgweb.hgwebdir(
20 h.run()
h = <mercurial.
/var/lib/
1043 yield tmpl("footer", motd=self.motd, **map)
1044
1045 m = os.path.
1046 tmpl = templater.
1047 defaults={"header": header,
m undefined, global os = <module 'os' from '/usr/lib/
/home/
60 if b.startswith('/'):
61 path = b
62 elif path == '' or path.endswith('/'):
63 path += b
64 else:
path = None, path.endswith undefined
AttributeError: 'NoneType' object has no attribute 'endswith'
args = ("'NoneType' object has no attribute 'endswith'",)
-------
# ServerAdmin <email address hidden>
# CustomLog logs/access_log.hg combined
# ErrorLog logs/error_log.hg
ScriptAlias /hg /home/zingo/
# RewriteEngine on
# RewriteRule (.*) /home/zingo/
<Directory "/home/
Order allow,deny
Allow from all
AllowOverride All
Options ExecCGI
AddHandler cgi-script .cgi
</Directory>
description: | updated |
Changed in mercurial: | |
status: | Unknown → Fix Released |
Changed in hg: | |
status: | Unknown → Fix Released |
I'm not a python hacker but could it be that join(templater. templatepath( ), "map") ------- ------ templatepath( ) == "NULL" ?
------------- hgweb.py line 1045
m = os.path.
-------
that
templater.
This don't give me any big clues but could it be that it don't find the template dir?
------- ------- -templater. py line 294
def templatepath( name=None) :
'''return location of template file or directory (if no name).
returns None if not found.'''
# executable version (py2exe) doesn't support __file__ join(os. path.dirname( module) , *fl)
if hasattr(sys, 'frozen'):
module = sys.executable
else:
module = __file__
for f in 'templates', '../templates':
fl = f.split('/')
if name: fl.append(name)
p = os.path.
if (name and os.path.exists(p)) or os.path.isdir(p):
return os.path.normpath(p)