52 |
""" |
""" |
53 |
dbg(self.key+' VAR: %s, S: %s, LIST: %s' % (var, s, list)) |
dbg(self.key+' VAR: %s, S: %s, LIST: %s' % (var, s, list)) |
54 |
|
|
55 |
redirection_path = config.working_directory |
if config.link_base_directory == None: |
56 |
|
redirection_path = config.working_directory |
57 |
|
else: redirection_path = config.link_base_directory |
58 |
|
|
59 |
if (len(s.split(' ')) > 0): |
if (len(s.split(' ')) > 0): |
60 |
""" |
""" |
61 |
The 'link' may be followed by an attributed, which is |
The 'link' may be followed by an attributed, which is |
63 |
in config. |
in config. |
64 |
""" |
""" |
65 |
redirection = s.split(' ')[-1] |
redirection = s.split(' ')[-1] |
|
s = s[0:len(s)-len(redirection)-1] |
|
66 |
if config.link_redirection.has_key(redirection): |
if config.link_redirection.has_key(redirection): |
67 |
|
s = s[0:len(s)-len(redirection)-1] |
68 |
redirection_path = config.link_redirection[redirection] |
redirection_path = config.link_redirection[redirection] |
69 |
dbg('Redirection %s: %s' % (redirection, redirection_path)) |
dbg('Redirection %s: %s' % (redirection, redirection_path)) |
70 |
|
|
80 |
link = link[0] |
link = link[0] |
81 |
if self.target == None or \ |
if self.target == None or \ |
82 |
not os.path.isfile(self.target): |
not os.path.isfile(self.target): |
83 |
if config.link_base_directory == None: |
self.target = os.path.normpath(slashify(redirection_path) + link) |
|
self.target = os.path.normpath(slashify(redirection_path) + link) |
|
|
else: |
|
|
self.target = os.path.normpath(slashify(redirection_path) + link) |
|
84 |
|
|
85 |
""" |
""" |
86 |
Final check and setting attributes. |
Final check and setting attributes. |