robots_perso: oubli d'un os.*path*.expanduser
This commit is contained in:
parent
096a243c77
commit
8248887f9c
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ robots_file = '/usr/scripts/var/perso/robots.txt'
|
|||
|
||||
robots = collections.defaultdict(lambda:collections.defaultdict(list))
|
||||
def add_robots(user, robots):
|
||||
robots_path = os.expanduser('~%s/www/robots.txt' % user)
|
||||
robots_path = os.path.expanduser('~%s/www/robots.txt' % user)
|
||||
if os.path.exists(robots_path):
|
||||
rp = robotparser.RobotFileParser()
|
||||
rp.parse(open(robots_path))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue